Wraps a general SQL command.
Commands may contain placeholders and can be precompiled for faster execution.
- Copyright
- (C) 2006 Radon Labs GmbH (C) 2013-2016 Individual contributors, see AUTHORS file
|
| Command () |
| constructor
|
|
virtual | ~Command () |
| destructor
|
|
virtual bool | Compile (const Ptr< Database > &db, const Util::String &sqlCommand, ValueTable *resultTable=0) |
| compile an SQL statement with optional placeholders
|
|
virtual bool | Execute ()=0 |
| execute compiled command
|
|
bool | CompileAndExecute (const Ptr< Database > &db, const Util::String &sqlCommand, ValueTable *resultTable=0) |
| shortcut for simple SQL commands
|
|
virtual void | Clear ()=0 |
| clear the current command
|
|
virtual bool | IsValid () const =0 |
| return true if command is compiled and ready for execution
|
|
const Util::String & | GetError () const |
| get last error
|
|
const Ptr< Database > & | GetDatabase () const |
| get back pointer to database
|
|
const Util::String & | GetSqlCommand () const |
| get the last compiled SQL command
|
|
const Ptr< ValueTable > & | GetValueTable () const |
| get the last set value table (can be 0!)
|
|
virtual IndexT | IndexOf (const Util::String &name) const =0 |
| convert a parameter name into an integer index
|
|
virtual IndexT | IndexOf (const Attr::AttrId &attrId) const =0 |
| convert a parameter attribute id into an integer index
|
|
virtual void | BindInt (IndexT index, int val)=0 |
| bind an integer by placeholder to 0-based index
|
|
virtual void | BindFloat (IndexT index, float val)=0 |
| bind a float by placeholder index to 0-based index
|
|
virtual void | BindBool (IndexT index, bool val)=0 |
| bind a bool by placeholder index 0-based index
|
|
virtual void | BindVec4 (IndexT index, const Math::vec4 &val)=0 |
| bind a vec4 by placeholder index 0-based index
|
|
virtual void | BindString (IndexT index, const Util::String &val)=0 |
| bind a string by placeholder index 0-based index
|
|
virtual void | BindMat4 (IndexT index, const Math::mat4 &val)=0 |
| bind a mat4 by placeholder index 0-based index
|
|
virtual void | BindBlob (IndexT index, const Util::Blob &val)=0 |
| bind a blob by placeholder index 0-based index
|
|
virtual void | BindGuid (IndexT index, const Util::Guid &val)=0 |
| bind a guid by placeholder index 0-based index
|
|
virtual void | BindInt (const Util::String &name, int val)=0 |
| bind an integer by placeholder name
|
|
virtual void | BindFloat (const Util::String &name, float val)=0 |
| bind a float by placeholder name
|
|
virtual void | BindBool (const Util::String &name, bool val)=0 |
| bind a bool by placeholder name
|
|
virtual void | BindVec4 (const Util::String &name, const Math::vec4 &val)=0 |
| bind a vec4 by placeholder name
|
|
virtual void | BindString (const Util::String &name, const Util::String &val)=0 |
| bind a string by placeholder name
|
|
virtual void | BindMat4 (const Util::String &name, const Math::mat4 &val)=0 |
| bind a mat4 by placeholder name
|
|
virtual void | BindBlob (const Util::String &name, const Util::Blob &val)=0 |
| bind a blob by placeholder name
|
|
virtual void | BindGuid (const Util::String &name, const Util::Guid &val)=0 |
| bind a guid by placeholder name
|
|
virtual void | BindInt (const Attr::AttrId &id, int val)=0 |
| bind an integer by placeholder attribute id
|
|
virtual void | BindFloat (const Attr::AttrId &id, float val)=0 |
| bind a float by placeholder attribute id
|
|
virtual void | BindBool (const Attr::AttrId &id, bool val)=0 |
| bind a bool by placeholder attribute id
|
|
virtual void | BindVec4 (const Attr::AttrId &id, const Math::vec4 &val)=0 |
| bind a vec4 by placeholder attribute id
|
|
virtual void | BindString (const Attr::AttrId &id, const Util::String &val)=0 |
| bind a string by placeholder attribute id
|
|
virtual void | BindMat4 (const Attr::AttrId &id, const Math::mat4 &val)=0 |
| bind a mat4 by placeholder attribute id
|
|
virtual void | BindBlob (const Attr::AttrId &id, const Util::Blob &val)=0 |
| bind a blob by placeholder attribute id
|
|
virtual void | BindGuid (const Attr::AttrId &id, const Util::Guid &val)=0 |
| bind a guid by placeholder attribute id
|
|
| RefCounted () |
| constructor
|
|
int | GetRefCount () const |
| get the current refcount
|
|
void | AddRef () |
| increment refcount by one
|
|
void | Release () |
| decrement refcount and destroy object if refcount is zero
|
|
bool | IsInstanceOf (const Rtti &rtti) const |
| return true if this object is instance of given class
|
|
bool | IsInstanceOf (const Util::String &className) const |
| return true if this object is instance of given class by string
|
|
bool | IsInstanceOf (const Util::FourCC &classFourCC) const |
| return true if this object is instance of given class by fourcc
|
|
bool | IsA (const Rtti &rtti) const |
| return true if this object is instance of given class, or a derived class
|
|
bool | IsA (const Util::String &rttiName) const |
| return true if this object is instance of given class, or a derived class, by string
|
|
bool | IsA (const Util::FourCC &rttiFourCC) const |
| return true if this object is instance of given class, or a derived class, by fourcc
|
|
const Util::String & | GetClassName () const |
| get the class name
|
|
Util::FourCC | GetClassFourCC () const |
| get the class FourCC code
|
|