SQLValueBinder.h++
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef __ccxx_SQLValueBinder_hxx
00024 #define __ccxx_SQLValueBinder_hxx
00025
00026 #include <commonc++/Common.h++>
00027 #include <commonc++/OutOfBoundsException.h++>
00028 #include <commonc++/SQLException.h++>
00029
00030 namespace ccxx {
00031
00032 class SQLQuery;
00033
00040 class COMMONCPPDB_API SQLValueBinder
00041 {
00042 public:
00043
00046 SQLValueBinder(SQLQuery &query) throw();
00047
00049 ~SQLValueBinder() throw();
00050
00057 SQLValueBinder& operator<<(bool value)
00058 throw(SQLException, OutOfBoundsException);
00059
00066 SQLValueBinder& operator<<(int value)
00067 throw(SQLException, OutOfBoundsException);
00068
00075 SQLValueBinder& operator<<(const int64_t &value)
00076 throw(SQLException, OutOfBoundsException);
00077
00084 SQLValueBinder& operator<<(const double &value)
00085 throw(SQLException, OutOfBoundsException);
00086
00093 SQLValueBinder& operator<<(const String &value)
00094 throw(SQLException, OutOfBoundsException);
00095
00102 SQLValueBinder& operator<<(const char *value)
00103 throw(SQLException, OutOfBoundsException);
00104
00111 SQLValueBinder& operator<<(const Blob &value)
00112 throw(SQLException, OutOfBoundsException);
00113
00120 SQLValueBinder& operator>>(bool &value)
00121 throw(SQLException, OutOfBoundsException);
00122
00129 SQLValueBinder& operator>>(int &value)
00130 throw(SQLException, OutOfBoundsException);
00131
00138 SQLValueBinder& operator>>(int64_t &value)
00139 throw(SQLException, OutOfBoundsException);
00140
00148 SQLValueBinder& operator>>(double &value)
00149 throw(SQLException, OutOfBoundsException);
00150
00157 SQLValueBinder& operator>>(String &value)
00158 throw(SQLException, OutOfBoundsException);
00159
00166 SQLValueBinder& operator>>(Blob &value)
00167 throw(SQLException, OutOfBoundsException);
00168
00172 void reset() throw();
00173
00174 private:
00175
00176 void checkInputIndex() throw(OutOfBoundsException);
00177 void checkOutputIndex() throw(OutOfBoundsException);
00178
00179 SQLQuery &_query;
00180 uint_t _index;
00181
00182 CCXX_COPY_DECLS(SQLValueBinder);
00183 };
00184
00185 }
00186
00187 #endif // __ccxx_SQLValueBinder_hxx
00188
00189