Row
[Data Access]

Data is stored and retrieved through rows. More...

Data Structures

struct  db_bind_t
 Row binding description. More...

Typedefs

typedef struct db_row_t_s * db_row_t

Functions

db_row_t db_alloc_row (const db_bind_t *, db_fieldno_t nbinds)
db_row_t db_alloc_cursor_row (db_cursor_t)
db_result_t db_free_row (db_row_t)
db_len_t db_get_field_size (db_row_t, db_fieldno_t)
db_vartype_t db_get_field_type (db_row_t, db_fieldno_t)
db_len_t db_get_field_len (db_row_t, db_fieldno_t)
db_result_t db_set_field_len (db_row_t, db_fieldno_t, db_len_t)
void * db_get_field_buffer (db_row_t, db_fieldno_t)
db_flags_t db_get_field_flags (db_row_t hrow, db_fieldno_t nfield)
db_len_t db_get_field_data (db_row_t, db_fieldno_t, db_vartype_t data_type, void *data_ptr, db_len_t data_size)
db_result_t db_set_field_data (db_row_t, db_fieldno_t, db_vartype_t data_type, const void *data_ptr, db_len_t data_length)
int db_is_null (db_row_t, db_fieldno_t)
db_result_t db_set_null (db_row_t, db_fieldno_t)
db_result_t db_bind_field (db_row_t hrow, const db_bind_t *)
db_result_t db_unbind_field (db_row_t, db_fieldno_t)
db_result_t db_bind_init (db_bind_t *)
db_result_t db_bind_destroy (db_bind_t *)

Length Indicator Values



#define DB_FIELD_NULL   _DB_FIELD_NULL
#define DB_NTS   _DB_NTS
#define DB_BLOB_CHSIZE   _DB_BLOB_CHSIZE
#define DB_AUTOFIELD   _DB_AUTOFIELD

Bind Types



#define DB_BIND_RELATIVE   _DB_BIND_RELATIVE
#define DB_BIND_ABSOLUTE   _DB_BIND_ABSOLUTE
#define DB_BIND_MASK   _DB_BIND_MASK

Data Binding



#define DB_ARRAY_DIM(x)   (sizeof(x) / sizeof(x[0]))
#define DB_BIND_STRUCT_MEMBER(field_no, type, bind_struct, member)   { field_no, type, DB_BIND_OFFSET(bind_struct, member), DB_BIND_SIZE(bind_struct, member), -1, DB_BIND_RELATIVE }
#define DB_BIND_VAR(field_no, type, var)   { field_no, type, DB_BIND_ADDRESS(&var), sizeof(var), DB_BIND_ADDRESS(NULL), DB_BIND_ABSOLUTE }
#define DB_BIND_STR(field_no, type, var)   { field_no, type, DB_BIND_ADDRESS(var), sizeof(var), DB_BIND_ADDRESS(NULL), DB_BIND_ABSOLUTE }
#define DB_BIND_PTR(field_no, type, var, size)   { field_no, type, DB_BIND_ADDRESS(var), size, DB_BIND_ADDRESS(NULL), DB_BIND_ABSOLUTE }
#define DB_BIND_STRUCT_MEMBER_IND(field_no, type, bind_struct, value, ind)   { field_no, type, DB_BIND_OFFSET(bind_struct, value), DB_BIND_SIZE(bind_struct, value), DB_BIND_OFFSET(bind_struct, ind), DB_BIND_RELATIVE }
#define DB_BIND_VAR_IND(field_no, type, var, ind)   { field_no, type, DB_BIND_ADDRESS(&var), sizeof(var), DB_BIND_ADDRESS(ind), DB_BIND_ABSOLUTE }
#define DB_BIND_STR_IND(field_no, type, var, ind)   { field_no, type, DB_BIND_ADDRESS(var), sizeof(var), DB_BIND_ADDRESS(ind), DB_BIND_ABSOLUTE }
#define DB_BIND_PTR_IND(field_no, type, var, size, ind)   { field_no, type, DB_BIND_ADDRESS(var), size, DB_BIND_ADDRESS(ind), DB_BIND_ABSOLUTE }

Detailed Description

Data is stored and retrieved through rows.

A row is a set of temporary buffers for storing the contents of database fields. Each field in a row can be stored in one of three locations: a managed internal buffer, a local variable referenced by memory address, or a member of a data structure. A row variable is independent of any specific row in the database and can be re-used for many insert, fetch and update operations.

 All Data Structures Files Functions Variables Typedefs Defines
Copyright © 2005-2011 ITTIA®. All rights reserved.