struct o_record * o_database_record_new_type(struct o_database *db, char type) { o_database_context_database_init(db); struct o_record * new_rec = o_record_factory(type); o_database_context_database_init(0); return new_rec; }
void test_o_record_new() { struct o_record * rec = o_record_factory('d'); struct o_record_id * id = o_record_get_id(rec); assert_true(o_record_id_cluster_id(id) == -1, "not the same cluster id of default"); assert_true(o_record_id_record_id(id) == -1, "not the same record id of default"); assert_true(o_record_version(rec) == 0, "the version not is the default"); o_record_release(rec); }