RTI Connext Micro  Version 2.4.1.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
db_api.h
1 /*
2  * FILE: db_api.h - DB API definitions
3  *
4  * (c) Copyright, Real-Time Innovations, 2012-2014.
5  * All rights reserved.
6  *
7  * No duplications, whole or partial, manual or electronic, may be made
8  * without express written permission. Any such copies, or
9  * revisions thereof, must display this notice unaltered.
10  * This code contains trade secrets of Real-Time Innovations, Inc.
11  *
12  * Modification History
13  * --------------------
14  * 31jul2014,tk MICRO-241/PR#1413 - Removed superfluous DB fields
15  * 31jul2014,tk MICRO-842/PR#9683 - Removed superfluous paramaters in DB
16  * compare function
17  * 06may2014,tk MICRO-227 (Verocel PR#1406): Refactored get_count() to better
18  * handle error conditions
19  * 28may2012,tk Written
20  */
21 /*ci
22  * \file
23  * \defgroup DBModule DB
24  */
25 
26 /*ci \addtogroup DBModule
27  * @{
28  */
29 #ifndef db_api_h
30 #define db_api_h
31 
32 #ifndef db_dll_h
33 #include "db/db_dll.h"
34 #endif
35 #ifndef osapi_types_h
36 #include "osapi/osapi_types.h"
37 #endif
38 #ifndef osapi_mutex_h
39 #include "osapi/osapi_mutex.h"
40 #endif
41 
42 #ifdef __cplusplus
43 extern "C"
44 {
45 #endif
46 
47 /*ci
48  * \ingroup DBModule
49  */
50 
51 /*ci
52  * \brief Abstract database declaration
53  * \ingroup DBModule
54  */
55 struct DB_Database;
56 
57 /*ci
58  * \brief Abstract database type
59  */
60 typedef struct DB_Database* DB_Database_T;
61 
62 /*ci
63  * \brief Abstract database table
64  */
65 struct DB_Table;
66 
67 /*ci
68  * \brief Abstract database table type
69  */
70 typedef struct DB_Table *DB_Table_T;
71 
72 /*ci
73  * \brief Abstract database table record
74  */
75 struct DB_Record;
76 
77 /*ci
78  * \brief Abstract database table record type
79  */
80 typedef void *DB_Record_T;
81 
82 /*ci
83  * \brief Abstract database key
84  */
85 typedef void* DB_Key_T;
86 
87 /*ci
88  * \brief Abstract database cursor
89  */
90 struct DB_Cursor;
91 
92 /*ci
93  * \brief Abstract database cursor type
94  */
95 typedef struct DB_Cursor *DB_Cursor_T;
96 
97 /*ci
98  * \brief Abstract database index
99  */
100 struct DB_Index;
101 
102 /*ci
103  * \brief Abstract database index type
104  */
105 typedef struct DB_Index *DB_Index_T;
106 
107 /****************/
108 
109 /*ci
110  * \brief Maximum length of a database name in ASCIIZ format, NULL included
111  */
112 #define URTDB_DATABASE_NAME_MAX_LENGTH 16
113 
114 /*ci
115  * \brief Maximum length of a table name in ASCIIZ format, NULL included
116  */
117 #define URTDB_TABLE_NAME_MAX_LENGTH 16
118 
119 /*ci
120  * \brief The value for the default index. The default index is created
121  * based on the compare function passed to the \ref DB_Database_create_table
122  * function.
123  */
124 #define DB_TABLE_DEFAULT_INDEX 0
125 
126 /*ci
127  * \brief Return code for database function
128  */
129 typedef enum
130 {
131  /*ci
132  * \brief Function call was successful
133  */
134  DB_RETCODE_OK = 0,
135 
136  /*ci
137  * \brief Invalid arguments to function
138  */
139  DB_RETCODE_BAD_PARAMETER,
140 
141  /*ci
142  * \brief One or more records still exist in the database
143  */
144  DB_RETCODE_EXISTS,
145 
146  /*ci
147  * \brief An cursor contains no more data, or a search did not yield any
148  * results
149  */
150  DB_RETCODE_NO_DATA,
151 
152  /*ci
153  * \brief The database is out of one or more pre-allocated resources
154  */
155  DB_RETCODE_OUT_OF_RESOURCES,
156 
157  /*ci
158  * \brief A cursor is no longer valid due to the database being updated
159  * while the cursor was in use
160  */
161  DB_RETCODE_INVALIDATED_CURSOR,
162 
163  /*ci
164  * \brief Generic catch all return code in case of failure
165  */
166  DB_RETCODE_ERROR
167 } DB_ReturnCode_T;
168 
169 /*ci
170  * \brief Database locking granularity
171  */
172 typedef enum
173 {
174  /*ci
175  * \brief The database is never locked
176  */
177  DB_LOCK_LEVEL_NONE = 0,
178 
179  /*ci
180  * \brief The database is using a shared lock (outside of the database)
181  */
182  DB_LOCK_LEVEL_SHARED = 1,
183 
184  /*ci
185  * \brief The database is using a global lock created internally
186  */
187  DB_LOCK_LEVEL_GLOBAL = 2
188 } DB_LockLevel_T;
189 
190 /*ci
191  * \brief Record selection criteria
192  */
193 typedef enum
194 {
195  /*ci
196  * \brief Select record from a table based on exact match
197  */
198  DB_SELECTOPCODE_EQUAL = 1,
199 
200  /*ci
201  * \brief Select records from a table that has a key within a range
202  */
203  DB_SELECTOPCODE_BETWEEN = 2,
204 
205  /*ci
206  * \brief Select all records from a table
207  */
208  DB_SELECTOPCODE_ALL = 3
209 } DB_Select_T;
210 
211 /*ci
212  * \brief Database properties
213  *
214  * \details
215  *
216  * A new database can be created with the following properties. Note that
217  * the properties are immutable.
218  */
219 struct DB_DatabaseProperty
220 {
221  /*ci
222  * \brief The maximum number of tables the database can contain
223  */
224  RTI_SIZE_T max_tables;
225 
226  /*ci
227  * \brief The locking mode used for the database
228  */
229  DB_LockLevel_T lock_mode;
230 };
231 
232 /*ci
233  * \brief Initialize a \ref DB_DatabaseProperty to a default value
234  */
235 #define DB_DatabaseProperty_INITIALIZER \
236 {\
237  1,\
238  DB_LOCK_LEVEL_NONE\
239 }
240 
241 /*ci
242  * \brief Operand 2 in the compare function is a key
243  */
244 #define DB_SELECT_OP2_AS_KEY (0x1)
245 
246 /*ci
247  * \brief Operand 3 in the compare function is a key
248  */
249 #define DB_SELECT_OP3_AS_KEY (0x2)
250 
251 /*ci
252  * \brief Test if operand 2 in the compare function is a key
253  */
254 #define DB_SELECT_OP2_IS_KEY(flags) (flags & DB_SELECT_OP2_AS_KEY)
255 
256 /*ci
257  * \brief Test if operand 3 in the compare function is a key
258  */
259 #define DB_SELECT_OP3_IS_KEY(flags) (flags & DB_SELECT_OP3_AS_KEY)
260 
261 /*ci
262  * \brief A generic record compare function
263  *
264  * \details
265  *
266  * A table contains records sorted by a key. It is not possible to
267  * create a table with no compare function. The compare function must
268  * maintain an ordered relationship.
269  *
270  * \param[in] flags Information about the operands
271  * \param[in] op1 Always DB_Record_T
272  * \param[in] op2 DB_Record_T or DB_Key_T (passed transparently from the user)
273  *
274  * \return The function must return a 0 if op1 == key, < 0 if op1 < key and
275  * > 0 if op1 > key.
276  *
277  * \sa \ref DB_SELECT_OP2_IS_KEY, \ref DB_SELECT_OP3_AS_KEY
278  */
279 FUNCTION_MUST_TYPEDEF(
280 RTI_INT32
281 (*DB_IndexCompare_T)(RTI_INT32 flags,const DB_Record_T op1, void *key)
282 )
283 
284 /*ci
285  * \brief Table properties
286  *
287  * \details
288  *
289  * A table can be created with the following properties. Note that
290  * the properties are immutable.
291  */
292 struct DB_TableProperty
293 {
294  /*ci
295  * \brief The maximum number of records the table can hold
296  */
297  RTI_SIZE_T max_records;
298 
299  /*ci
300  * \brief The maximum number of indices which can be created on the table
301  */
302  RTI_SIZE_T max_indices;
303 
304  /*ci
305  * \brief The maximum number of cursors which can be open on the table
306  * at any given time
307  */
308  RTI_SIZE_T max_cursors;
309 };
310 
311 /*ci
312  * \brief Initialize a \ref DB_TableProperty to a default value
313  */
314 #define DB_TableProperty_INITIALIZER \
315 {\
316  0,\
317  0,\
318  1\
319 }
320 
321 /*ci
322  * \brief Index properties
323  *
324  * \details
325  *
326  * A index can be created with the following properties. Note that
327  * the properties are immutable.
328  */
329 struct DB_IndexProperty
330 {
331  /*ci
332  * \brief The maximum number of entries the index can hold
333  */
334  RTI_SIZE_T max_entries;
335 
336  /*ci
337  * \brief Whether the index only allows unique keys or duplicates
338  */
339  RTI_BOOL unique;
340 };
341 
342 /*ci
343  * \brief Initialize a \ref DB_IndexProperty to a default value
344  */
345 #define DB_IndexProperty_INITIALIZER \
346 {\
347  0,\
348  RTI_TRUE\
349 }
350 
351 /**************************** Database Functions ******************************/
352 
353 /*ci
354  * \brief Create an empty database
355  *
356  * \param[inout] db Handle to the newly created database. *db must be NULL.
357  * \param[in] name The name of the database. The name is not used for
358  * anything, but cannot be NULL.
359  * \param[in] property The database properties. Cannot be NULL.
360  * \param[in] shared_lock If the lock-level is \ref DB_LOCK_LEVEL_SHARED this
361  * argument must point to a valid mutex.
362  *
363  * \return One of \ref DB_ReturnCode_T is returned. If DB_RETCODE_OK is returned
364  * db holds a reference to the new database.
365  *
366  * \sa \ref DB_Database_delete
367  *
368  */
369 MUST_CHECK_RETURN DBDllExport DB_ReturnCode_T
370 DB_Database_create(DB_Database_T *db,
371  const char *name,
372  struct DB_DatabaseProperty *property,
373  OSAPI_Mutex_T *const shared_lock);
374 
375 /*ci
376  * \brief Delete a database
377  *
378  * \details
379  *
380  * This function deletes a database and returns any memory to the system.
381  * It is illegal to delete a database that has resources in use. For example,
382  * it is illegal to delete a database where a cursor is open or a table contains
383  * records. This restriction exists to prevent an application from deleting
384  * resources that may be in use and thus could cause a memory access violation.
385  *
386  * \param[in] db Handle to db shall be deleted
387  *
388  * \return One of \ref DB_ReturnCode_T is returned. If DB_RETCODE_OK is returned
389  * the database was deleted and db is no longer a valid handle. Note
390  * the hanlde is not cleared.
391  *
392  * \sa \ref DB_Database_create
393  *
394  */
395 SHOULD_CHECK_RETURN DBDllExport DB_ReturnCode_T
396 DB_Database_delete(DB_Database_T db);
397 
398 /*ci
399  * \brief Lock database to prevent modifications
400  *
401  * \details
402  *
403  * This function locks a database, preventing any modification to it.
404  * If the database was created with a lock-level of \ref DB_LOCK_LEVEL_SHARED
405  * or \ref DB_LOCK_LEVEL_GLOBAL the mutex is taken before returning. Otherwise
406  * this call always succeeds. Note that there is no timeout on the mutex.
407  * A locked database must be unlocked with \ref DB_Database_unlock. Is is
408  * legal to lock the database multiple times from the same thread, and a
409  * database must be unlocked as many times as it was locked.
410  *
411  * \param[in] db Handle to db to lock
412  *
413  * \return One of \ref DB_ReturnCode_T is returned. If DB_RETCODE_OK is returned
414  * the database was successfully locked.
415  *
416  * \sa \ref DB_Database_unlock, \ref DB_LockLevel_T
417  *
418  */
419 MUST_CHECK_RETURN DBDllExport DB_ReturnCode_T
420 DB_Database_lock(DB_Database_T db);
421 
422 /*ci
423  * \brief Unlocked a database previously locked with \ref DB_Database_lock
424  *
425  * \details
426  *
427  * This function unlocks a database, allowing modifications to it. Note that is
428  * a database was locked multiple time, an equal number of unlocks is required.
429  *
430  * \param[in] db Handle to db to unlock
431  *
432  * \return One of \ref DB_ReturnCode_T is returned. If DB_RETCODE_OK is returned
433  * the database was successfully unlocked.
434  *
435  * \sa \ref DB_Database_lock, \ref DB_LockLevel_T
436  *
437  */
438 MUST_CHECK_RETURN DBDllExport DB_ReturnCode_T
439 DB_Database_unlock(DB_Database_T db);
440 
441 /*ci
442  * \brief Create a database table
443  *
444  * \details
445  *
446  * This function creates an empty database table. Each table in the same
447  * database must have a unique name. A table contains fixed size records.
448  * Any memory allocation required by a record must be done outside of the
449  * database. That is, any record that contains pointer must be initialized
450  * outside of the table itself.
451  *
452  * \param[inout] table Handle to new table. *table must be NULL on input
453  * \param[in] db Database where the table shall be created.
454  * Cannot be NULL
455  * \param[in] name Name of the table. Must be unique in the database.
456  * Cannot be NULL
457  * \param[in] record_size Size if bytes of a record. Must be > 0
458  * \param[in] compare_func The compare function. Cannot be NULL
459  * \param[in] property Table properties. Cannot be NULL
460  *
461  * \return One of \ref DB_ReturnCode_T is returned. If DB_RETCODE_OK is returned
462  * the table was successfully created and table contains a handle to
463  * the newly created table
464  *
465  * \sa \ref DB_Database_delete_table
466  *
467  */
468 MUST_CHECK_RETURN DBDllExport DB_ReturnCode_T
469 DB_Database_create_table(DB_Table_T *table,
470  DB_Database_T db,
471  const char *name,
472  RTI_SIZE_T record_size,
473  DB_IndexCompare_T compare_func,
474  struct DB_TableProperty *property);
475 
476 #define DB_Database_create_table_type(t_,db_,name_,TYPE,prop_) \
477  DB_Database_create_table(t_,db_,name_,sizeof(TYPE),prop_)
478 
479 /*ci
480  * \brief Delete a database table
481  *
482  * \details
483  *
484  * Deletes a database table. A database table can only be deleted if it
485  * is empty and there are no oustanding cursors.
486  *
487  * \param[in] db Database to delete table from
488  * \param[in] table Table to delete
489  *
490  * \return One of \ref DB_ReturnCode_T is returned. If DB_RETCODE_OK is returned
491  * the table was successfully deleted.
492  *
493  * \sa \ref DB_Database_create_table
494  *
495  */
496 SHOULD_CHECK_RETURN DBDllExport DB_ReturnCode_T
497 DB_Database_delete_table(DB_Database_T db,DB_Table_T table);
498 
499 /*************************** Table Functions **********************************/
500 
501 /*ci
502  * \brief Create record
503  *
504  * \details
505  *
506  * A table can only manage records created from the table. Create a record
507  * return an unused record. Note that the record is not initialized. It is
508  * illegal to delete a table with records in use. That is, all records must be
509  * deleted from a table before the table can be deleted.
510  *
511  * \param[in] table Table to create record from
512  * \param[inout] record Created record. *record must be NULL on input
513  *
514  * \return One of \ref DB_ReturnCode_T is returned. If DB_RETCODE_OK is returned
515  * the record was successfully created and a handle is returned in
516  * record.
517  *
518  * \sa \ref DB_Table_delete_record
519  *
520  */
521 MUST_CHECK_RETURN DBDllExport DB_ReturnCode_T
522 DB_Table_create_record(DB_Table_T table,DB_Record_T *record);
523 
524 /*ci
525  * \brief Insert a record into the table
526  *
527  * \details
528  *
529  * A record becomes available to users of a table only after it is inserted.
530  * If a record is inserted into a cursor selection the cursor is invalidated.
531  *
532  * \param[in] table Table to insert record into
533  * \param[in] record Record to insert
534  *
535  * \return One of \ref DB_ReturnCode_T is returned. If DB_RETCODE_OK is returned
536  * the record was successfully inserted.
537  *
538  * \sa \ref DB_Table_delete_record
539  *
540  */
541 MUST_CHECK_RETURN DBDllExport DB_ReturnCode_T
542 DB_Table_insert_record(DB_Table_T table, DB_Record_T record);
543 
544 /*ci
545  * \brief Remove a record from a table
546  *
547  * \details
548  *
549  * Remove a record from the table based on the key. The record is no longer
550  * searchable and it not reusable until deleted.
551  *
552  * \param[in] table Table to remove record from
553  * \param[out] record Removed record
554  * \param[in] key The key to search for
555  *
556  * \return One of \ref DB_ReturnCode_T is returned. If DB_RETCODE_OK is returned
557  * the record was removed.
558  *
559  * \sa \ref DB_Table_insert_record
560  *
561  */
562 MUST_CHECK_RETURN DBDllExport DB_ReturnCode_T
563 DB_Table_remove_record(DB_Table_T table,DB_Record_T *record,DB_Key_T key);
564 
565 /*ci
566  * \brief Delete a record from a table
567  *
568  * \details
569  *
570  * Delete the record from the table. A deleted record will be marked as free
571  * for reuse and may be returned by \ref DB_Table_create_record.
572  *
573  * \param[in] table Table to delete record from
574  * \param[out] record Record to delete
575  *
576  * \return One of \ref DB_ReturnCode_T is returned. If DB_RETCODE_OK is returned
577  * the record was deleted.
578  *
579  * \sa \ref DB_Table_create_record
580  *
581  */
582 SHOULD_CHECK_RETURN DBDllExport DB_ReturnCode_T
583 DB_Table_delete_record(DB_Table_T table,DB_Record_T record);
584 
585 
586 /*ci
587  * \brief Create a new index for a table
588  *
589  * \details
590  *
591  * A table always has a default index based on the compare function passed
592  * to \ref DB_Database_create_table function. It is however possible to create
593  * a subset of the table or sort the records in a different order by creating
594  * a new index. Note that it is illegal to delete a table with which as indices
595  * (except for the default).
596  *
597  * \param[in] table Table to create index for
598  * \param[inout] index Handle to index, *index must be NULL on input
599  * \param[in] compare_func Compare function
600  * \param[in] property The index property
601  *
602  * \return One of \ref DB_ReturnCode_T is returned. If DB_RETCODE_OK is returned
603  * the index was successfully created and a handle available in the
604  * index output parameter.
605  *
606  * \sa \ref DB_Table_delete_index
607  *
608  */
609 MUST_CHECK_RETURN DBDllExport DB_ReturnCode_T
610 DB_Table_create_index(DB_Table_T table,
611  DB_Index_T *index,
612  DB_IndexCompare_T compare_func,
613  const struct DB_IndexProperty *const property);
614 /*ci
615  * \brief Delete an index
616  *
617  * \details
618  *
619  * Delete an index previously created with \ref DB_Table_create_index
620  *
621  * \param[in] table Table to delete index from
622  * \param[in] index Handle to index
623  *
624  * \return One of \ref DB_ReturnCode_T is returned. If DB_RETCODE_OK is returned
625  * the index was successfully created and a handle available in the
626  * index output parameter.
627  *
628  * \sa \ref DB_Table_delete_index
629  *
630  */
631 #ifndef RTI_CERT
632 SHOULD_CHECK_RETURN DBDllExport DB_ReturnCode_T
633 DB_Table_delete_index(DB_Table_T table,DB_Index_T index);
634 #endif /* !RTI_CERT */
635 
636 /*ci
637  * \brief Select all the records from an index
638  *
639  * \details
640  *
641  * Create cursor to iterate over all the records in an index. The
642  * DB_Table_select_all_default function used the default index which will result
643  * in all the records in the table. The recors are ordered based on the compare
644  * function for the index used for the selection.
645  *
646  * Note that the database should be locked while iterating over a cursor.
647  *
648  * \param[in] table Table to delete index from
649  * \param[in] index Index to return records from
650  * \param[inout] cursor Cursor to iterate over result set
651  *
652  * \return One of \ref DB_ReturnCode_T is returned. If DB_RETCODE_OK is returned
653  * the index was successfully created and a handle available in the
654  * index output parameter.
655  *
656  * \sa \ref DB_Table_select_match, \ref DB_Table_select_range
657  *
658  */
659 MUST_CHECK_RETURN DBDllExport DB_ReturnCode_T
660 DB_Table_select_all(DB_Table_T table,DB_Index_T index,DB_Cursor_T *cursor);
661 
662 #define DB_Table_select_all_default(table_,eh_) \
663  DB_Table_select_all(table_,DB_TABLE_DEFAULT_INDEX,eh_)
664 
665 /*ci
666  * \brief Select all the records from an index
667  *
668  * \details
669  *
670  * Search for a record with a matching key. If a match is found the
671  * record is return in the record parameter. If none are found
672  * DB_RETCODE_NO_DATA is returned. NOTE: The output parameter is only updated
673  * on success. If not record is found the output argument is _not_ updated.
674  *
675  * \param[in] table Table to delete index from
676  * \param[in] index Index to return records from
677  * \param[in] record Record to search for
678  * \param[in] key Key to search for
679  *
680  * \return One of \ref DB_ReturnCode_T is returned. If DB_RETCODE_OK is returned
681  * record points to the matching record.
682  *
683  * \sa \ref DB_Table_select_all, \ref DB_Table_select_range
684  *
685  */
686 SHOULD_CHECK_RETURN DBDllExport DB_ReturnCode_T
687 DB_Table_select_match(DB_Table_T table,DB_Index_T index,
688  DB_Record_T *record,DB_Key_T key);
689 
690 /*ci
691  * \brief Select all the records from an index
692  *
693  * \details
694  *
695  * Return all records that lies between [lower,upper] keys.
696  *
697  * \param[in] table Table to delete index from
698  * \param[in] index Index to return records from
699  * \param[in] cursor Cursor to the result set
700  * \param[in] lower Lower key to search for
701  * \param[in] upper Upper key to search for
702  *
703  * \return One of \ref DB_ReturnCode_T is returned. If DB_RETCODE_OK is returned
704  * cursor holds records which lies within the [lower,upper] range of
705  * keys.
706  *
707  * \sa \ref DB_Table_select_all, \ref DB_Table_select_match
708  *
709  */
710 SHOULD_CHECK_RETURN DBDllExport DB_ReturnCode_T
711 DB_Table_select_range(DB_Table_T table,DB_Index_T index,
712  DB_Cursor_T *cursor,
713  DB_Key_T lower,DB_Key_T upper);
714 
715 /*ci
716  * \brief Return the name of a table
717  *
718  * \details
719  *
720  * Return the name of a table
721  *
722  * \param[in] table Table to return name for
723  *
724  * \return pointer to name of table
725  *
726  * \sa
727  *
728  */
729 DBDllExport const char*
730 DB_Table_get_name(DB_Table_T table);
731 
732 /*ci
733  * \brief Return the number of records in a result set for a cursor
734  *
735  * \param[in] cursor Cursor to result set
736  * \param[out] count Number of records the cursor can iterate over
737  *
738  * \return One of \ref DB_ReturnCode_T is returned. If DB_RETCODE_OK is returned
739  * count holds number of records.
740  *
741  * \sa \ref DB_Table_select_range, \ref DB_Table_select_all
742  *
743  */
744 MUST_CHECK_RETURN DBDllExport DB_ReturnCode_T
745 DB_Cursor_get_count(DB_Cursor_T cursor,RTI_INT32 *count);
746 
747 /*ci
748  * \brief Return the next record the cursor is pointing to
749  *
750  * \details
751  *
752  * This function return the next record the cursor is pointing. When a cursor
753  * is first created it point to no records, and upon the first call to
754  * \ref DB_Cursor_get_next it points to the first record.
755  *
756  * \param[in] handle Cursor point to a result set
757  * \param[out] record Pointer to the next record
758  *
759  * \return One of \ref DB_ReturnCode_T is returned. If DB_RETCODE_OK is returned
760  * record point to the next record.
761  *
762  * \sa \ref DB_Table_select_range, \ref DB_Table_select_all,
763  * \ref DB_Cursor_finish
764  *
765  */
766 MUST_CHECK_RETURN DBDllExport DB_ReturnCode_T
767 DB_Cursor_get_next(DB_Cursor_T handle, DB_Record_T *record);
768 
769 /*ci
770  * \brief Close a cursor
771  *
772  * \details
773  *
774  * This function closes a cursor and returns it to the table. Note that it
775  * is illegal to delete a table if there are open cursors.
776  *
777  * \param[in] table Table the cursor should be returned to. Must be the
778  * same table the cursor was created from.
779  *
780  * \param[in] cursor Cursor to close.
781  *
782  * \return One of \ref DB_ReturnCode_T is returned. If DB_RETCODE_OK is returned
783  * record point to the next record.
784  *
785  * \sa \ref DB_Table_select_range, \ref DB_Table_select_all
786  *
787  */
788 DBDllExport void
789 DB_Cursor_finish(DB_Table_T table,DB_Cursor_T cursor);
790 
791 #ifdef __cplusplus
792 } /* extern "C" */
793 #endif
794 
795 #endif /* db_api_h */
796 
797 /*ci @} */

RTI Connext Micro Version 2.4.1.0 Copyright © Thu Nov 20 2014 Real-Time Innovations, Inc