Tizen RT Public API
v1.1 D4
|
Provides APIs for Lightweight Database, Arastorage. More...
Files | |
file | arastorage.h |
APIs for Lightweight Database, Arastorage. | |
Functions | |
db_result_t | db_init (void) |
initialize database's resources, it must be called for using arastorage More... | |
db_result_t | db_deinit (void) |
de-initialize database's resources, it must be called when terminating arastorage More... | |
db_result_t | db_exec (char *format) |
create or remove relations, attributes and indexes in arastorage More... | |
db_cursor_t * | db_query (char *format) |
process query of arastorage More... | |
db_result_t | db_cursor_free (db_cursor_t *cursor) |
free allocated cursor data, it should be called before application terminated More... | |
const char * | db_get_result_message (db_result_t code) |
get string corresponding to each result value of API More... | |
db_result_t | db_print_header (db_cursor_t *cursor) |
print the name of relation and attributes More... | |
db_result_t | db_print_tuple (db_cursor_t *cursor) |
print the tuple data More... | |
db_result_t | db_print_value (db_cursor_t *cursor, int attr_index) |
print current row's data with specific attribute index More... | |
db_result_t | cursor_move_first (db_cursor_t *cursor) |
move current position of cursor to first row More... | |
db_result_t | cursor_move_last (db_cursor_t *cursor) |
move current position of cursor to last row More... | |
db_result_t | cursor_move_next (db_cursor_t *cursor) |
move current position of cursor to next row More... | |
db_result_t | cursor_move_prev (db_cursor_t *cursor) |
move current position of cursor to previous row More... | |
db_result_t | cursor_move_to (db_cursor_t *cursor, tuple_id_t row_id) |
move current position of cursor to specific row More... | |
bool | cursor_is_first_row (db_cursor_t *cursor) |
check whether current position of cursor is first row More... | |
bool | cursor_is_last_row (db_cursor_t *cursor) |
check whether current position of cursor is last row More... | |
cursor_row_t | cursor_get_row (db_cursor_t *cursor) |
get current position of cursor More... | |
cursor_row_t | cursor_get_count (db_cursor_t *cursor) |
get the number of rows of cursor More... | |
domain_t | cursor_get_attr_type (db_cursor_t *cursor, int attr_index) |
get type of attribute with specific index in cursor More... | |
char * | cursor_get_attr_name (db_cursor_t *cursor, int attr_index) |
get name of attribute with specific index in cursor More... | |
attribute_id_t | cursor_get_attr_index (db_cursor_t *cursor, const char *attr_name) |
get index of attribute corresponding name in cursor More... | |
int | cursor_get_int_value (db_cursor_t *cursor, int attr_index) |
get value of attribute of which the type is DOMAIN_INT with specific index in current row. More... | |
long | cursor_get_long_value (db_cursor_t *cursor, int attr_index) |
get value of attribute of which the type is DOMAIN_LONG with specific index in current row. More... | |
unsigned char * | cursor_get_string_value (db_cursor_t *cursor, int attr_index) |
get value of attribute of which the type is DOMAIN_STRING with specific index in current row. More... | |
Provides APIs for Lightweight Database, Arastorage.
attribute_id_t cursor_get_attr_index | ( | db_cursor_t * | cursor, |
const char * | attr_name | ||
) |
get index of attribute corresponding name in cursor
#include <arastorage/arastorage.h>
[in] | cursor | a pointer to cursor |
[in] | attr_name | attribute name |
char* cursor_get_attr_name | ( | db_cursor_t * | cursor, |
int | attr_index | ||
) |
get name of attribute with specific index in cursor
#include <arastorage/arastorage.h>
[in] | cursor | a pointer to cursor |
[in] | attr_index | index of attribute(column) in cursor |
domain_t cursor_get_attr_type | ( | db_cursor_t * | cursor, |
int | attr_index | ||
) |
get type of attribute with specific index in cursor
#include <arastorage/arastorage.h>
[in] | cursor | a pointer to cursor |
[in] | attr_index | index of attribute(column) in cursor |
cursor_row_t cursor_get_count | ( | db_cursor_t * | cursor | ) |
get the number of rows of cursor
#include <arastorage/arastorage.h>
[in] | cursor | a pointer to cursor |
int cursor_get_int_value | ( | db_cursor_t * | cursor, |
int | attr_index | ||
) |
get value of attribute of which the type is DOMAIN_INT with specific index in current row.
#include <arastorage/arastorage.h>
[in] | cursor | a pointer to cursor |
[in] | attr_index | index of attribute(column) in cursor |
long cursor_get_long_value | ( | db_cursor_t * | cursor, |
int | attr_index | ||
) |
get value of attribute of which the type is DOMAIN_LONG with specific index in current row.
#include <arastorage/arastorage.h>
[in] | cursor | a pointer to cursor |
[in] | attr_index | index of attribute(column) in cursor |
cursor_row_t cursor_get_row | ( | db_cursor_t * | cursor | ) |
get current position of cursor
#include <arastorage/arastorage.h>
[in] | cursor | a pointer to cursor |
unsigned char* cursor_get_string_value | ( | db_cursor_t * | cursor, |
int | attr_index | ||
) |
get value of attribute of which the type is DOMAIN_STRING with specific index in current row.
#include <arastorage/arastorage.h>
[in] | cursor | a pointer to cursor |
[in] | attr_index | index of attribute(column) in cursor |
bool cursor_is_first_row | ( | db_cursor_t * | cursor | ) |
check whether current position of cursor is first row
#include <arastorage/arastorage.h>
[in] | cursor | a pointer to cursor |
bool cursor_is_last_row | ( | db_cursor_t * | cursor | ) |
check whether current position of cursor is last row
#include <arastorage/arastorage.h>
[in] | cursor | a pointer to cursor |
db_result_t cursor_move_first | ( | db_cursor_t * | cursor | ) |
move current position of cursor to first row
#include <arastorage/arastorage.h>
[in] | cursor | a pointer to cursor |
db_result_t cursor_move_last | ( | db_cursor_t * | cursor | ) |
move current position of cursor to last row
#include <arastorage/arastorage.h>
[in] | cursor | a pointer to cursor |
db_result_t cursor_move_next | ( | db_cursor_t * | cursor | ) |
move current position of cursor to next row
#include <arastorage/arastorage.h>
[in] | cursor | a pointer to cursor |
db_result_t cursor_move_prev | ( | db_cursor_t * | cursor | ) |
move current position of cursor to previous row
#include <arastorage/arastorage.h>
[in] | cursor | a pointer to cursor |
db_result_t cursor_move_to | ( | db_cursor_t * | cursor, |
tuple_id_t | row_id | ||
) |
move current position of cursor to specific row
#include <arastorage/arastorage.h>
[in] | cursor | a pointer to cursor |
[in] | row_id | index of row |
db_result_t db_cursor_free | ( | db_cursor_t * | cursor | ) |
free allocated cursor data, it should be called before application terminated
#include <arastorage/arastorage.h>
[in] | cursor | a pointer to cursor |
db_result_t db_deinit | ( | void | ) |
de-initialize database's resources, it must be called when terminating arastorage
#include <arastorage/arastorage.h>
none |
db_result_t db_exec | ( | char * | format | ) |
create or remove relations, attributes and indexes in arastorage
#include <arastorage/arastorage.h>
[in] | format | query sentence |
const char* db_get_result_message | ( | db_result_t | code | ) |
get string corresponding to each result value of API
#include <arastorage/arastorage.h>
[in] | code | result value |
db_result_t db_init | ( | void | ) |
initialize database's resources, it must be called for using arastorage
#include <arastorage/arastorage.h>
none |
db_result_t db_print_header | ( | db_cursor_t * | cursor | ) |
print the name of relation and attributes
#include <arastorage/arastorage.h>
[in] | cursor | a pointer to cursor |
db_result_t db_print_tuple | ( | db_cursor_t * | cursor | ) |
print the tuple data
#include <arastorage/arastorage.h>
[in] | cursor | a pointer to cursor |
db_result_t db_print_value | ( | db_cursor_t * | cursor, |
int | attr_index | ||
) |
print current row's data with specific attribute index
#include <arastorage/arastorage.h>
[in] | cursor | a pointer to cursor |
[in] | attr_index | index of attribute(column) in cursor |
db_cursor_t* db_query | ( | char * | format | ) |
process query of arastorage
#include <arastorage/arastorage.h>
[in] | format | query sentence |