#include <SQLiteDatabase.hpp>
Inherits pion::platform::Query.
Definition at line 254 of file SQLiteDatabase.hpp.
Public Member Functions | |
| virtual | ~SQLiteQuery () |
| virtual destructor releases the prepared statement | |
| SQLiteQuery (const std::string &sql_query, sqlite3 *db_ptr) | |
| virtual void | bindNull (unsigned int param) |
| virtual void | bindString (unsigned int param, const std::string &value, bool copy_value=true) |
| virtual void | bindBlob (unsigned int param, const char *value, size_t size, bool copy_value=true) |
| virtual void | bindString (unsigned int param, const char *value, bool copy_value=true) |
| virtual void | bindInt (unsigned int param, const boost::int32_t value) |
| virtual void | bindUInt (unsigned int param, const boost::uint32_t value) |
| virtual void | bindBigInt (unsigned int param, const boost::int64_t value) |
| virtual void | bindUBigInt (unsigned int param, const boost::uint64_t value) |
| virtual void | bindFloat (unsigned int param, const float value) |
| virtual void | bindDouble (unsigned int param, const double value) |
| virtual void | bindLongDouble (unsigned int param, const long double value) |
| virtual void | bindDateTime (unsigned int param, const PionDateTime &value) |
| virtual void | bindDate (unsigned int param, const PionDateTime &value) |
| virtual void | bindTime (unsigned int param, const PionDateTime &value) |
| virtual void | fetchString (unsigned int param, std::string &value) |
| Fetch a string from a column. | |
| virtual void | fetchBlob (unsigned int param, std::string &value) |
| Fetch a Blob from a column. | |
| virtual boost::int32_t | fetchInt (unsigned int param) |
| Fetch an int from a column. | |
| virtual boost::uint32_t | fetchUInt (unsigned int param) |
| Fetch an unsigned int from a column. | |
| virtual boost::int64_t | fetchBigInt (unsigned int param) |
| Fetch a long int from a column. | |
| virtual boost::uint64_t | fetchUBigInt (unsigned int param) |
| Fetch an unsigned long int from a column. | |
| virtual float | fetchFloat (unsigned int param) |
| Fetch a float from a column. | |
| virtual double | fetchDouble (unsigned int param) |
| Fetch a double from a column. | |
| virtual long double | fetchLongDouble (unsigned int param) |
| Fetch a long double from a column. | |
| virtual void | fetchDateTime (unsigned int param, PionDateTime &val) |
| Fetch a date from a column. | |
| virtual void | fetchDate (unsigned int param, PionDateTime &val) |
| Fetch a time from a column. | |
| virtual void | fetchTime (unsigned int param, PionDateTime &val) |
| Fetch a time from a column. | |
| virtual bool | run (void) |
| virtual bool | runFullQuery (const pion::platform::Query::FieldMap &ins, const pion::platform::EventPtr &src, const pion::platform::Query::FieldMap &outs, pion::platform::EventPtr &dest, unsigned int limit, const boost::regex &suppress) |
| virtual bool | runFullGetMore (const pion::platform::Query::FieldMap &outs, pion::platform::EventPtr &dest, unsigned int limit) |
| virtual void | reset (void) |
| resets the compiled query so that it can be run again | |
| bool | fetchRow (const FieldMap &field_map, pion::platform::EventPtr e) |
| After a query, fetch a row into an event. | |
| pion::plugins::SQLiteDatabase::SQLiteQuery::SQLiteQuery | ( | const std::string & | sql_query, | |
| sqlite3 * | db_ptr | |||
| ) |
constructs a new SQLiteQuery object
| database | reference to the Database used to perform the query | |
| sqlite_db | the SQLite database that this query belongs to |
Definition at line 384 of file SQLiteDatabase.cpp.
References pion::plugins::SQLiteDatabase::throwAPIException().
| virtual void pion::plugins::SQLiteDatabase::SQLiteQuery::bindBigInt | ( | unsigned int | param, | |
| const boost::int64_t | value | |||
| ) | [inline, virtual] |
binds a big integer value to a query parameter
| param | the query parameter number to which the value will be bound (starting with 0) | |
| value | the value to bind to the query parameter |
Implements pion::platform::Query.
Definition at line 347 of file SQLiteDatabase.hpp.
References pion::plugins::SQLiteDatabase::throwAPIException().
| virtual void pion::plugins::SQLiteDatabase::SQLiteQuery::bindBlob | ( | unsigned int | param, | |
| const char * | value, | |||
| size_t | size, | |||
| bool | copy_value = true | |||
| ) | [inline, virtual] |
binds a std::string value to a query parameter (Blob)
| param | the query parameter number to which the value will be bound (starting with 0) | |
| value | the value to bind to the query parameter | |
| copy_value | if true, the string will be copied into a temporary buffer |
Implements pion::platform::Query.
Definition at line 300 of file SQLiteDatabase.hpp.
References pion::plugins::SQLiteDatabase::throwAPIException().
| virtual void pion::plugins::SQLiteDatabase::SQLiteQuery::bindDate | ( | unsigned int | param, | |
| const PionDateTime & | value | |||
| ) | [inline, virtual] |
binds a date_time value to a query parameter (use bindString() instead)
| param | the query parameter number to which the value will be bound (starting with 0) | |
| value | the value to bind to the query parameter |
Implements pion::platform::Query.
Definition at line 416 of file SQLiteDatabase.hpp.
References pion::platform::Query::getDateString(), and pion::plugins::SQLiteDatabase::throwAPIException().
| virtual void pion::plugins::SQLiteDatabase::SQLiteQuery::bindDateTime | ( | unsigned int | param, | |
| const PionDateTime & | value | |||
| ) | [inline, virtual] |
binds a date_time value to a query parameter (use bindString() instead)
| param | the query parameter number to which the value will be bound (starting with 0) | |
| value | the value to bind to the query parameter |
Implements pion::platform::Query.
Definition at line 402 of file SQLiteDatabase.hpp.
References pion::platform::Query::getDateTimeString(), and pion::plugins::SQLiteDatabase::throwAPIException().
| virtual void pion::plugins::SQLiteDatabase::SQLiteQuery::bindDouble | ( | unsigned int | param, | |
| const double | value | |||
| ) | [inline, virtual] |
binds a double floating point number value to a query parameter
| param | the query parameter number to which the value will be bound (starting with 0) | |
| value | the value to bind to the query parameter |
Implements pion::platform::Query.
Definition at line 380 of file SQLiteDatabase.hpp.
References pion::plugins::SQLiteDatabase::throwAPIException().
| virtual void pion::plugins::SQLiteDatabase::SQLiteQuery::bindFloat | ( | unsigned int | param, | |
| const float | value | |||
| ) | [inline, virtual] |
binds a floating point number value to a query parameter
| param | the query parameter number to which the value will be bound (starting with 0) | |
| value | the value to bind to the query parameter |
Implements pion::platform::Query.
Definition at line 369 of file SQLiteDatabase.hpp.
References pion::plugins::SQLiteDatabase::throwAPIException().
| virtual void pion::plugins::SQLiteDatabase::SQLiteQuery::bindInt | ( | unsigned int | param, | |
| const boost::int32_t | value | |||
| ) | [inline, virtual] |
binds an integer value to a query parameter
| param | the query parameter number to which the value will be bound (starting with 0) | |
| value | the value to bind to the query parameter |
Implements pion::platform::Query.
Definition at line 325 of file SQLiteDatabase.hpp.
References pion::plugins::SQLiteDatabase::throwAPIException().
| virtual void pion::plugins::SQLiteDatabase::SQLiteQuery::bindLongDouble | ( | unsigned int | param, | |
| const long double | value | |||
| ) | [inline, virtual] |
binds a long double floating point number value to a query parameter
| param | the query parameter number to which the value will be bound (starting with 0) | |
| value | the value to bind to the query parameter |
Implements pion::platform::Query.
Definition at line 391 of file SQLiteDatabase.hpp.
References pion::plugins::SQLiteDatabase::throwAPIException().
| virtual void pion::plugins::SQLiteDatabase::SQLiteQuery::bindNull | ( | unsigned int | param | ) | [inline, virtual] |
binds a NULL value to a query parameter
| param | the query parameter number to which the value will be bound (starting with 0) |
Implements pion::platform::Query.
Definition at line 275 of file SQLiteDatabase.hpp.
References pion::plugins::SQLiteDatabase::throwAPIException().
| virtual void pion::plugins::SQLiteDatabase::SQLiteQuery::bindString | ( | unsigned int | param, | |
| const char * | value, | |||
| bool | copy_value = true | |||
| ) | [inline, virtual] |
binds a string (const char *) value to a query parameter
| param | the query parameter number to which the value will be bound (starting with 0) | |
| value | the value to bind to the query parameter | |
| copy_value | if true, the string will be copied into a temporary buffer |
Implements pion::platform::Query.
Definition at line 313 of file SQLiteDatabase.hpp.
References pion::plugins::SQLiteDatabase::throwAPIException().
| virtual void pion::plugins::SQLiteDatabase::SQLiteQuery::bindString | ( | unsigned int | param, | |
| const std::string & | value, | |||
| bool | copy_value = true | |||
| ) | [inline, virtual] |
binds a std::string value to a query parameter
| param | the query parameter number to which the value will be bound (starting with 0) | |
| value | the value to bind to the query parameter | |
| copy_value | if true, the string will be copied into a temporary buffer |
Implements pion::platform::Query.
Definition at line 287 of file SQLiteDatabase.hpp.
References pion::plugins::SQLiteDatabase::throwAPIException().
| virtual void pion::plugins::SQLiteDatabase::SQLiteQuery::bindTime | ( | unsigned int | param, | |
| const PionDateTime & | value | |||
| ) | [inline, virtual] |
binds a date_time value to a query parameter (use bindString() instead)
| param | the query parameter number to which the value will be bound (starting with 0) | |
| value | the value to bind to the query parameter |
Implements pion::platform::Query.
Definition at line 430 of file SQLiteDatabase.hpp.
References pion::platform::Query::getTimeString(), and pion::plugins::SQLiteDatabase::throwAPIException().
| virtual void pion::plugins::SQLiteDatabase::SQLiteQuery::bindUBigInt | ( | unsigned int | param, | |
| const boost::uint64_t | value | |||
| ) | [inline, virtual] |
binds an unsigned big integer value to a query parameter
| param | the query parameter number to which the value will be bound (starting with 0) | |
| value | the value to bind to the query parameter |
Implements pion::platform::Query.
Definition at line 358 of file SQLiteDatabase.hpp.
References pion::plugins::SQLiteDatabase::throwAPIException().
| virtual void pion::plugins::SQLiteDatabase::SQLiteQuery::bindUInt | ( | unsigned int | param, | |
| const boost::uint32_t | value | |||
| ) | [inline, virtual] |
binds an unsigned integer value to a query parameter
| param | the query parameter number to which the value will be bound (starting with 0) | |
| value | the value to bind to the query parameter |
Implements pion::platform::Query.
Definition at line 336 of file SQLiteDatabase.hpp.
References pion::plugins::SQLiteDatabase::throwAPIException().
| bool pion::plugins::SQLiteDatabase::SQLiteQuery::run | ( | void | ) | [virtual] |
runs the compiled query
Implements pion::platform::Query.
Definition at line 394 of file SQLiteDatabase.cpp.
References pion::plugins::SQLiteDatabase::throwAPIException().
| bool pion::plugins::SQLiteDatabase::SQLiteQuery::runFullGetMore | ( | const pion::platform::Query::FieldMap & | outs, | |
| pion::platform::EventPtr & | dest, | |||
| unsigned int | limit | |||
| ) | [virtual] |
gets more results for generic query
| outs | a FieldMap of output fields | |
| dest | output event, used for outs FieldMap | |
| limit | how many results max |
Implements pion::platform::Query.
Definition at line 368 of file SQLiteDatabase.cpp.
References pion::platform::Query::fetchEvent().
| bool pion::plugins::SQLiteDatabase::SQLiteQuery::runFullQuery | ( | const pion::platform::Query::FieldMap & | ins, | |
| const pion::platform::EventPtr & | src, | |||
| const pion::platform::Query::FieldMap & | outs, | |||
| pion::platform::EventPtr & | dest, | |||
| unsigned int | limit, | |||
| const boost::regex & | suppress | |||
| ) | [virtual] |
runs a generic query
| ins | a FieldMap of input fields | |
| src | input event, used for ins FieldMap | |
| outs | a FieldMap of output fields | |
| dest | output event, used for outs FieldMap | |
| suppress | regex containing pattern of suppressable errors |
Implements pion::platform::Query.
Definition at line 354 of file SQLiteDatabase.cpp.
References pion::platform::Query::bindEvent(), and pion::platform::Query::fetchEvent().
1.4.7