fixed get
此函数通过单次调用读取所有固定大小(非字符、字符串或 BLOB 类型)字段的值。C 结构指针值将接收固定大小的数据。
MCO_RET classname_fixed_put(
/*IN*/ classname *handle,
/*OUT*/ classname_fixed const * value
);
参数
handle
classname *
类句柄类型变量的地址。
value
classname_fixed const *
指向类型为 classname_fixed
的结构变量的指针,将从由句柄 handle
引用的对象中读取固定长度的数据到该结构变量中。
返回
MCO_S_OK
写入值成功。
MCO_E_TRANSACT
发生事务错误。
MCO_ERR_OBJECT_HANDLE
无效的对象句柄。
示例
Application snippet:
const char * db_name = "operations";
int main(int argc, char* argv[])
{
MCO_RET rc;
sample_memory_t dbmem;
sample_os_initialize(DEFAULT);
/* Start SmartEDB runtime */
mco_runtime_start();
sample_header("Sample 'operations' performs basic insert, read, and update operations.\n" );
rc = sample_open_database( db_name, simpledb_get_dictionary(), DATABASE_SIZE, CACHE_SIZE,
MEMORY_PAGE_SIZE, PSTORAGE_PAGE_SIZE, 1, &dbmem );
...
/* Get field values from A_fixed */
printf("\n\tUsing A_fixed :\n" );
A_fixed_get(&a, &_a);
}