00001 /*************************************************************************** 00002 * Copyright (C) 2007 by www.databasecache.com * 00003 * Contact: praba_tuty@databasecache.com * 00004 * * 00005 * This program is free software; you can redistribute it and/or modify * 00006 * it under the terms of the GNU General Public License as published by * 00007 * the Free Software Foundation; either version 2 of the License, or * 00008 * (at your option) any later version. * 00009 * * 00010 * This program is distributed in the hope that it will be useful, * 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00013 * GNU General Public License for more details. * 00014 * * 00015 ***************************************************************************/ 00016 #include <CSql.h> 00017 #include <sql.h> 00018 #include <sqlext.h> 00019 #include <Network.h> 00020 00021 class CacheTableLoader 00022 { 00023 char tableName[IDENTIFIER_LENGTH]; 00024 char userName[IDENTIFIER_LENGTH]; 00025 char password[IDENTIFIER_LENGTH]; 00026 00027 public: 00028 CacheTableLoader(){strcpy(tableName,"");} 00029 void setConnParam(char *user, char *pass){ strcpy(userName, user); strcpy(password, pass); } 00030 void setTable(char *tablename) { strcpy(tableName,tablename); } 00031 DbRetVal addToCacheTableFile(); 00032 DbRetVal removeFromCacheTableFile(); 00033 DbRetVal load(bool tabDef=true); 00034 DbRetVal reload(); 00035 DbRetVal unload(bool tabDefinition = true); 00036 DbRetVal refresh(); 00037 DbRetVal recoverAllCachedTables(); 00038 DbRetVal load(DatabaseManager *dbMgr, bool tabDef); 00039 }; 00040 00041 class BindBuffer 00042 { 00043 public: 00044 void *csql; 00045 void *targetdb; 00046 DataType type; 00047 }; 00048