fixing readmes in examples
[csql.git] / include / SqlLogStatement.h
blob4141a62a1715e789b728740d4968d6d8ad04d21d
1 /***************************************************************************
2 * Copyright (C) 2007 by Prabakaran Thirumalai *
3 * praba_tuty@yahoo.com *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19 ***************************************************************************/
20 #ifndef SQLLOGSTATEMENT_H
21 #define SQLLOGSTATEMENT_H
22 #include <AbsSqlStatement.h>
23 #include <SqlLogConnection.h>
24 #include <SqlFactory.h>
25 #include <CSql.h>
26 class SqlLogStatement: public AbsSqlStatement
28 public:
29 SqlLogStatement(){innerStmt = NULL; con = NULL; needLog= false; sid=0; }
31 void setConnection(AbsSqlConnection *conn)
33 if (innerStmt) innerStmt->setConnection(conn->getInnerConnection());
34 con = conn;
37 bool isNonSelectDML(char *stmtstr);
38 DbRetVal prepare(char *stmt);
40 DbRetVal execute(int &rowsAffect);
41 DbRetVal bindParam(int pos, void*);
43 DbRetVal bindField(int pos, void* val);
45 void* fetch();
46 void* fetchAndPrint(bool SQL);
47 void* next();
48 DbRetVal close();
49 int noOfProjFields();
51 void* getFieldValuePtr( int pos );
53 DbRetVal free();
55 int noOfParamFields();
57 DbRetVal getProjFldInfo(int projPos, FieldInfo *&info);
59 DbRetVal getParamFldInfo(int paramPos, FieldInfo *&info);
61 void setShortParam(int paramPos, short value);
62 void setIntParam(int paramPos, int value);
63 void setLongParam(int paramPos, long value);
64 void setLongLongParam(int paramPos, long long value);
65 void setByteIntParam(int paramPos, ByteInt value);
66 void setFloatParam(int paramPos, float value);
67 void setDoubleParam(int paramPos, double value);
68 void setStringParam(int paramPos, char *value);
69 void setDateParam(int paramPos, Date value);
70 void setTimeParam(int paramPos, Time value);
71 void setTimeStampParam(int paramPos, TimeStamp value);
72 bool isSelect();
74 bool isCached;
75 TableSyncMode mode;
76 private:
78 bool needLog;
79 int sid; //statement id
80 List paramList;
82 static UniqueID stmtUID;
83 friend class SqlFactory;
86 #endif