include/AbsSqlConnection.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2007 by Prabakaran Thirumalai   *
00003  *   praba_tuty@yahoo.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  *   You should have received a copy of the GNU General Public License     *
00016  *   along with this program; if not, write to the                         *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00019  ***************************************************************************/
00020 #ifndef ABSSQLCONNECTION_H
00021 #define ABSSQLCONNECTION_H
00022 #include<CSql.h>
00023 
00024 enum TransSyncMode {
00025     OSYNC=1,
00026     ASYNC=2,
00027     OASYNC=3
00028 };
00029 
00030 enum TableSyncMode {
00031     TABLE_OSYNC=1,
00032     TABLE_ASYNC=2
00033 };
00050 class AbsSqlConnection
00051 {
00052     protected:
00053     AbsSqlConnection *innerConn;
00054     public:
00055     void setInnerConnection(AbsSqlConnection *conn) { innerConn = conn; }
00056     AbsSqlConnection* getInnerConnection() { return innerConn; }
00057     virtual Connection& getConnObject() =0;
00058 
00064     virtual DbRetVal connect (char *user, char * pass) =0;
00065 
00069     virtual DbRetVal disconnect () = 0;
00070 
00078     virtual DbRetVal commit() = 0;
00079 
00087     virtual DbRetVal rollback() = 0;
00088 
00097     virtual DbRetVal beginTrans (IsolationLevel isoLevel = READ_COMMITTED,
00098                                  TransSyncMode mode = OSYNC) = 0;
00099     virtual ~AbsSqlConnection(){}
00100 
00101 };
00102 
00103 #endif

Generated on Mon Jun 9 22:37:14 2008 for csql by  doxygen 1.4.7