📄 dbwrapper.h
字号:
#ifndef dbwrapper_h#define dbwrapper_h#define _PGSQL/* #define _GNOMEDB *//** * Low level calls to postgresql, or another database provider depending what * is asked for in #defines. This is a straight wrapper around psql or gnome-db * or what ever else providers maybe supported */#ifdef _PGSQL/* Postgresql specific headers to be included. */#include <libpq-fe.h>#endif#ifdef _GNOMEDB/* Gnome-db specific headers, this is for supporting lots of databases */#include <libdga.h>#endif/* Standard structures for databases. */typedef struct { gchar *query; gchar *basetable;#ifdef _PGSQL PGresult *res;#endif#ifdef _GNOMEDB GdaRecordSet *res; gulong rec_count;#endif }DbRecordSet;typedef struct { /* connection string */ gchar *connstring; /* type of database your connecting to */ enum { DB_UNKNOWN, DB_PGSQL } dbserver;#ifdef _PGSQL PGconn *conn;#endif #ifdef _GNOMEDB GdaConnection *conn;#endif }DbConnection;extern DbConnection *globaldbconn;#ifdef _PGSQL/* Posgresql Code is here */#include "dbpgsql.h"#endif#ifdef _GNOMEDB/* Gnome DB code is here */#include "dbgnomedb.h"#endif/* some functions .. .*/gint db_dbgetserver();#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -