sptk2 logo
SPTK Home Page
Public Member Functions | List of all members
sptk::InsertQuery Class Reference

#include <InsertQuery.h>

Inheritance diagram for sptk::InsertQuery:
sptk::Query sptk::QueryStatementManagement sptk::DataSource

Public Member Functions

 InsertQuery (const DatabaseConnection &db, const String &sql="", const String &idFieldName="id")
 
String sql () const override
 
void sql (const String &_sql) override
 
void exec () override
 
void exec (const String &newSQL) override
 
uint64_t id () const
 
- Public Member Functions inherited from sptk::Query
 Query () noexcept
 
 Query (const DatabaseConnection &db, const String &sql="", bool autoPrepare=true)
 
 Query (PoolDatabaseConnection *db, const String &sql="", bool autoPrepare=true)
 
 Query (const Query &)=delete
 
Queryoperator= (const Query &)=delete
 
 ~Query () override
 
Fieldoperator[] (size_t fieldIndex) override
 
Fieldoperator[] (const String &fieldName) override
 
size_t fieldCount () const override
 
size_t recordCount () const override
 
virtual String sql () const
 
virtual void sql (const String &_sql)
 
FieldListfields ()
 
QueryParameterListparams ()
 
bool readField (const char *fname, Variant &value) override
 
bool writeField (const char *fname, const Variant &fvalue) override
 
bool open () override
 
bool close () override
 
bool next () override
 
virtual void exec ()
 
virtual void exec (const String &newSQL)
 
void fetch ()
 
size_t paramCount () const
 
QueryParameterparam (const char *paramName) const
 
QueryParameterparam (const String &paramName) const
 
QueryParameterparam (size_t paramIndex) const
 
- Public Member Functions inherited from sptk::QueryStatementManagement
 QueryStatementManagement (bool autoPrepare)
 
 QueryStatementManagement (const QueryStatementManagement &other)=delete
 
StmtHandle statement () const
 
bool autoPrepare () const
 
bool active () const
 
bool prepared () const
 
bool eof () const override
 
bool bulkMode () const
 
void connect (PoolDatabaseConnection *db)
 
void disconnect ()
 
PoolDatabaseConnectiondatabase () const
 
void database (PoolDatabaseConnection *db)
 
- Public Member Functions inherited from sptk::DataSource
 DataSource ()=default
 
virtual ~DataSource ()=default
 
virtual Fieldoperator[] (size_t fieldIndex)=0
 
virtual Fieldoperator[] (const String &fieldName)=0
 
virtual size_t fieldCount () const =0
 
virtual size_t recordCount () const =0
 
virtual bool readField (const char *fieldName, Variant &fieldValue)=0
 
virtual bool writeField (const char *fieldName, const Variant &fieldValue)=0
 
virtual bool open ()
 
virtual bool close ()
 
virtual bool first ()
 
virtual bool next ()
 
virtual bool prior ()
 
virtual bool last ()
 
virtual bool find (const String &, const Variant &)
 
virtual bool eof () const
 
bool load ()
 
bool save ()
 
void exportRowTo (const xdoc::SNode &node, bool compactXmlMode, bool nullLargeData=false)
 
virtual void exportTo (xdoc::Node &parentNode, const String &nodeName, bool compactXmlMode)
 

Additional Inherited Members

- Static Public Member Functions inherited from sptk::Query
static void throwError (const String &method, const String &error)
 
- Protected Member Functions inherited from sptk::Query
void execute ()
 
bool loadData () override
 
bool saveData () override
 
- Protected Member Functions inherited from sptk::QueryStatementManagement
void setDatabase (PoolDatabaseConnection *db)
 
void setStatement (StmtHandle statement)
 
void setPrepared (bool prepared)
 
void setActive (bool active)
 
void setEof (bool eof)
 
void setBulkMode (bool _bulkMode)
 
void closeStmt (bool freeStatement=false)
 
void closeQuery (bool releaseStatement=false)
 
Stringsmessages ()
 
StringgetSQL ()
 
const StringgetSQL () const
 
void setSQL (const String &sql)
 
void notImplemented (const String &functionName) const
 
virtual bool loadData ()
 
virtual bool saveData ()
 

Detailed Description

Database query

A Dataset connected to the database to execute a database queries. The type of the database depends on the DatabaseConnection object query is connected to.


The documentation for this class was generated from the following file:

Fri Oct 14 2022 09:58:43: SPTK 5.4.1