dbcache.h
来自「bonddb 是一个源于PostgreSQL封装包的对象。它是一个由C/C++编」· C头文件 代码 · 共 63 行
H
63 行
#ifndef dbcache_h#define dbcache_h#include "dbheader.h"/** * Caching module. * * All this code resided in both dbtoliet and dbuniqueid but i brought the code into * here so dbuniqueid and dbtoliet can concentrate with what they do best. * DbCache attempts to act as both reading and writing cache for records. * It is also used for filtering purposes. */struct DbCache { /* gchar* list of fields, NULL's will be present for those not retrieved or set etc */ gchar **value; /* flags for data */ gchar *flags; /* width of data */ gint num; /* this is the row it refers to */ gint origrow; /* UniqueId of this row */ DbUniqueId *id; /* Filtering and sorting */ DbFilter *filter; /* state of the row, whether its for reading or writing */ enum { OBJ_READ, OBJ_EDITREAD, OBJ_NEW, OBJ_EDITNEW } state; /* has the row been changed in anyway */ gboolean changed; };/** State defintion: * * OBJ_READ is a space filler. hmmm . * OBJ_EDITREAD is that the object was read in and then edited. * OBJ_NEW means that its a completely new object. * OBJ_EDITNEW means you just edited a freshly new object that was written back to db. */gint db_cache_cleanup(Object *obj);DbCache * db_cache_moveto(Object *obj);DbCache * db_cache_isincache(Object * obj);gint db_cache_delete(Object * obj);gint db_cache_getvalue(Object * obj, DbCache * cache, gchar * field, gchar * table, gchar ** value);gint db_cache_setvalue(Object * obj, DbCache * cache, gchar * field, gchar * table, gchar * value);gint db_cache_updateid(Object * obj, DbUniqueId * id, DbCache *cache);void db_cache_debug(Object *obj);gboolean db_cache_hascache(Object *obj, int i);#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?