1 #ifndef BZS_DB_PROTOCOL_TDAP_CLIENT_DATABASE_H
2 #define BZS_DB_PROTOCOL_TDAP_CLIENT_DATABASE_H
21 #include "nsDatabase.h"
38 #if (defined(__BORLANDC__) && !defined(__APPLE__) && !defined(__clang__))
39 typedef bool __stdcall (*deleteRecordFn)(database* db, table* tb,
bool inkey);
40 typedef short __stdcall (*schemaMgrFn)(database* db);
41 typedef void __stdcall (*
copyDataFn)(database* db, table* tb,
int recordCount,
int count,
46 typedef bool(__STDCALL* deleteRecordFn)(database* db, table* tb,
bool inkey);
52 typedef short(__STDCALL* schemaMgrFn)(database* db);
61 friend struct openTablePrams;
62 struct dbimple* m_impl;
64 void setDir(
const _TCHAR* directory);
65 virtual table* createTableObject();
66 bool defaultImageCopy(
const void* data,
short& tableIndex);
68 table* doOpenTable(
struct openTablePrams* pm,
const _TCHAR* ownerName);
69 void* getExtendBufferForOpen(uint_td& size);
70 _TCHAR* getTableUri(_TCHAR* buf,
short fileNum);
71 _TCHAR* getTableUri(_TCHAR* buf,
const _TCHAR* filename);
72 inline void copyEachFieldData(
table* dest,
table* src,
struct fieldChnageInfo* fci);
79 void setLockReadOnly(
bool v);
80 virtual void doClose();
81 virtual void doOpen(
const _TCHAR* uri,
short type,
short mode,
82 const _TCHAR* username);
87 bool isCreated) {
return true;}
88 virtual char* getContinuousList(
int option);
89 virtual void onCopyDataInternal(
table* tb,
int recordCount,
int count,
91 virtual void doConvertTable(
short tableIndex,
bool turbo,
92 const _TCHAR* ownerName);
93 virtual bool doReopenDatabaseSchema();
96 virtual void release();
98 const _TCHAR* rootDir()
const;
99 void setRootDir(
const _TCHAR* directory);
100 void* optionalData()
const;
101 void setOptionalData(
void* v);
102 bool tableReadOnly()
const;
103 void setTableReadOnly(
bool value);
104 const deleteRecordFn onDeleteRecord()
const;
105 void setOnDeleteRecord(
const deleteRecordFn v);
108 bool open(
const _TCHAR* uri,
short schemaType = 0,
short mode = -2,
109 const _TCHAR* dir = NULL,
const _TCHAR* ownerName = NULL);
111 bool autoCreate =
true,
const _TCHAR* ownerName = NULL,
112 const _TCHAR* uri = NULL);
114 bool autoCreate =
true,
const _TCHAR* ownerName = NULL,
115 const _TCHAR* uri = NULL);
117 bool createTable(
const char* utf8Sql);
118 bool createTable(
short fileNum,
const _TCHAR* uri = NULL);
119 char* getSqlStringForCreateTable(
const _TCHAR* tableName,
char* retbuf, uint_td* size);
120 void create(
const _TCHAR* uri,
short type = TYPE_SCHEMA_BDF);
121 void drop(
const _TCHAR* uri=NULL);
123 void close(
bool withDropDefaultSchema =
false);
125 short continuous(char_td op = TD_BACKUP_START,
bool inclideRepfile =
false);
126 short assignSchemaData(
const dbdef* src);
127 short copyTableData(
table* dest,
table* src,
bool turbo,
128 short keyNum = -1,
int maxSkip = -1);
130 const _TCHAR* ownerName = NULL);
131 bool existsTableFile(
short tableIndex,
const _TCHAR* ownerName = NULL);
133 bool isOpened()
const;
134 char_td mode()
const;
135 bool autoSchemaUseNullkey()
const;
136 void setAutoSchemaUseNullkey(
bool v);
139 inline bool execSql(
const char* utf8Sql){
return createTable(utf8Sql);}
146 static void setCompatibleMode(
int mode);
147 static int compatibleMode();
148 static const int CMP_MODE_OLD_NULL = 0;
149 static const int CMP_MODE_MYSQL_NULL = 1;
150 static const int CMP_MODE_BINFD_DEFAULT_STR = 2;
151 static const int CMP_MODE_OLD_ALL = 2;
152 static const int CMP_MODE_OLD_BIN = 3;
178 #endif // BZS_DB_PROTOCOL_TDAP_CLIENT_DATABASE_H
Definition: database.h:157
データベースアクセス基本クラス (nocopyable)
Definition: nsDatabase.h:85
virtual bool onOpenAfter()
Definition: database.h:84
static int compatibleMode()
バージョン配列構造体
Definition: tdapSchema.h:1324
void(__STDCALL * copyDataFn)(database *db, table *tb, int recordCount, int count, bool &cancel)
Definition: database.h:55
テーブルスキーマ管理クラス (nocopyable noncreatable)
Definition: dbDef.h:46
テーブルアクセスクラス (nocopyable)
Definition: table.h:91
void dropTable(Database_Ptr db, const _TCHAR *name)
Definition: trdboostapi.h:952
グルーピング レコード数カウンター
Definition: groupQuery.h:287
table_ptr openTable(Database_Ptr db, const _TCHAR *name, short mode=TD_OPEN_NORMAL, bool autoCreate=true, const _TCHAR *ownerName=NULL, const _TCHAR *uri=NULL)
Definition: trdboostapi.h:920
virtual int defaultAutoIncSpace() const
Definition: database.h:138
bool execSql(const char *utf8Sql)
Definition: database.h:139
static void setCompatibleMode(int mode)
データベースアクセスクラス
Definition: database.h:59
void convertTable(Database_Ptr db, short tableid, copyDataFn func=NULL)
Definition: trdboostapi.h:961
typedef short(__STDCALL *schemaMgrFn)(database *db)
~overrideCompatibleMode()
Definition: database.h:166
virtual bool onTableOpened(table *tb, short fileNum, short mode, bool isCreated)
Definition: database.h:86
overrideCompatibleMode(int v)
Definition: database.h:161