📄 dbobject.h
字号:
#ifndef dbobject_h#define dbobject_h#include "dbheader.h"#include "dbwrapper.h"/* this is included as part of the db objects *//* object is a datasource pointing to a row in a table in the back end */struct Object { /* A unique number specifying how this was created. umdedodoaa */ gint objectinstance; /* name of this object */ gchar *name; /* query used to generate the data, for refreshing when needed */ gchar *query; /* Description of the query and what it composes of. This is an array to match the PGresult of explaining exactly where this value was obtained from */ DbField **field; gint numfield; /* write ahead cache. */ DbCache **cache; gint numcache; /* Cache position corresponding to your row */ DbCache *currentcache; /* Hash table. No this is not drugs */ /* actually i lie. its not here. NAH NA */ /* Your current unique id for selected record */ DbUniqueId *id; /* currently selected row in the data selection */ gint row; /* PQresult returned from inital query to specify this datasource. */ DbRecordSet *res; /* if set to true then free res on closure, else dont touch */ gboolean freeresult; /* age of record */ gboolean newrecord; gboolean changed; gboolean unknownid; gboolean readonly; gboolean mapoutofsync; /* filtering information */ gboolean filtered; DbFilterApplied *filterapplied; /* How much of bonddb library can i use without breaking? */ gboolean fulldbsupport; gboolean sqlgood; /* list information, on how many rows there are */ gint num; /* reference information to other objects */ GList *mapobject; /* NEED create by method thingy */ DbBirth *birth; };gint db_obj_addwrite(Object * obj, gchar * field, gchar * table, gchar * value, gboolean mark);gint db_obj_doread(Object * obj, gchar * field, gchar * table, gchar ** value);gint db_obj_sqlwrite(gchar * query, gchar * targettable, DbUniqueId ** id);gint db_obj_sqlread(Object * obj, gchar * query);gint db_obj_test(Object * obj);Object *db_obj_create(gchar * name);gint db_obj_setcacheandid(Object * obj);gint db_obj_free(Object * obj);gint db_obj_clear(Object * obj);gint db_obj_applydefaults(Object * obj);gint db_obj_handle_empty_recordset(Object * obj);gint db_obj_handle_new_recordset(Object * obj);gint db_obj_dodelete(Object * obj);gint db_obj_debug(Object * obj);gint db_obj_refresh(Object * obj);#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -