ConnectionMT.h

Go to the documentation of this file.
00001 /*
00002  * $Id:ConnectionMT.h 540 2007-08-20 07:51:56Z mindstorm2600 $
00003  *
00004  * X-VR2 
00005  * 
00006  * Copyright (C) Juan V. Guerrero 2007
00007  * 
00008  * Juan V. Guerrero <mindstorm2600@users.sourceforge.net>
00009  * 
00010  * This program is free software, distributed under the terms of
00011  * the GNU General Public License Version 2. See the LICENSE file
00012  * at the top of the source tree.
00013  */
00014 #ifndef __XVR2_SQL_ConnectionMT_H__
00015 #define __XVR2_SQL_ConnectionMT_H__
00016 
00017 #include<xvr2/xvr2config.h>
00018 #include<xvr2/SQL/Driver.h>
00019 #include<xvr2/SQL/Connection.h>
00020 #include<xvr2/Mutex.h>
00021 
00022 namespace xvr2{
00023         namespace SQL {
00029                 class ConnectionMT:public Connection {
00030                         private:
00031                                 Mutex mt;
00032                         protected:
00033                         public:
00035                                 ConnectionMT(Driver *drv);
00039                                 ConnectionMT(Driver *drv, const String &server, 
00040                                               const String &dbname,
00041                                               const String &u, const String &p, 
00042                                               int port = 0);
00044                                 ~ConnectionMT();
00045                                 ConnectionMT();
00051                                 void connect(const String &server, const String &u, 
00052                                              const String &dbname,
00053                                              const String &p, int port = 0);
00059                                 void connect(Driver *d, const String &server, const String &u, 
00060                                              const String &dbname,
00061                                              const String &p, int port = 0);
00065                                 void connect();
00068                                 void disconnect();
00078                                 ResultSet *query(const String &cmd);
00079                                 ResultSet *query(const StringBuffer &cmd);
00083                                 int execCommand(const String &cmd);
00087                                 int execCommand(const StringBuffer &cmd);
00093                                 void commit();
00094                                 void bulkUploadBegin(const String &table, const String &cols, const String &_delim);
00095                                 void bulkUploadData(const String &data);
00096                                 void bulkUploadEnd();
00097 
00098                                 String escapeString(const String &s);
00099                                 char *escapeString(const char *);
00100                                 const char *errorMessage();
00102                                 const bool isConnected();
00103                 };
00104         };
00105 };
00106 
00107 #endif

Generated on Fri Jun 20 22:55:48 2008 for X-VR2 SDK by  doxygen 1.5.5