A wrapper class to bulk-write data to the database in a simple way.
- Copyright
- (C) 2006 Radon Labs GmbH (C) 2013-2016 Individual contributors, see AUTHORS file
|
| Writer () |
| constructor
|
|
virtual | ~Writer () |
| destructor
|
|
void | SetDatabase (const Ptr< Database > &db) |
| set database object
|
|
void | SetTableName (const Util::String &n) |
| set the database table name
|
|
void | AddColumn (const Db::Column &col) |
| add a column definition
|
|
void | SetFlushTable (bool flushTable) |
| set true if the table should be deleted before writing new data
|
|
bool | Open () |
| open the writer
|
|
bool | OpenFromValueTable (const Ptr< ValueTable > &values) |
| special case: open from existing value table
|
|
bool | IsOpen () const |
| return true if open
|
|
void | Close () |
| close the writer - write to DB
|
|
void | BeginRow () |
| begin writing a new row
|
|
void | SetBool (Attr::BoolAttrId id, bool b) |
| set bool attribute in current row
|
|
void | SetInt (Attr::IntAttrId id, int i) |
| set int attribute in current row
|
|
void | SetFloat (Attr::FloatAttrId id, float f) |
| set float attribute in current row
|
|
void | SetString (Attr::StringAttrId id, const Util::String &s) |
| set string attribute in current row
|
|
void | SetVec4 (Attr::Vec4AttrId id, const Math::vec4 &v) |
| set vec4 attribute in current row
|
|
void | SetMat4 (Attr::Mat4AttrId id, const Math::mat4 &m) |
| set mat4 attribute in current row
|
|
void | SetGuid (Attr::GuidAttrId id, const Util::Guid &guid) |
| set guid attribute in current row
|
|
void | SetBlob (Attr::BlobAttrId id, const Util::Blob &blob) |
| set blob attribute in current row
|
|
void | EndRow () |
| end current row
|
|
| 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
|
|