#include <sqldb.h>
Public Member Functions | |
Field (const std::string &name, const std::string &table, const std::string &type, const std::string &defaultvalue, bool isint, bool isflt, bool isstr, bool isbin, unsigned int sz) | |
Field constructor. Users will never use this. | |
std::string | name () const |
The name of the field. | |
std::string | table () const |
The name of the table containing this column. | |
std::string | type () const |
The type of this field. The return value is dbms-dependent. | |
std::string | defaultvalue () const |
The default value (see the constructor). | |
bool | numeric () const |
Does the field have a numeric (int or float) type? | |
bool | integer () const |
Does the field have an integer type? | |
bool | real () const |
Does the field have floating point type? | |
bool | binary () const |
Does the field have a binary type? | |
bool | text () const |
Does the field have a string type? | |
unsigned int | size () const |
Size of the field (in bytes). | |
Static Public Member Functions | |
Dv::Util::Date | timestamp2date (const std::string ×tamp) |
Convert mysql timestamp(14) value, e.g. 20010724110830 to Date. | |
Private Attributes | |
std::string | name_ |
std::string | table_ |
std::string | type_ |
std::string | default_ |
bool | int_ |
bool | float_ |
bool | string_ |
bool | binary_ |
unsigned int | size_ |
Friends | |
std::ostream & | operator<< (std::ostream &, const Field &) |
Print readable representation on ostream. |
Definition at line 72 of file sqldb.h.
|
Field constructor. Users will never use this. What are valid arguments is dbms-dependent. |
|
The name of the field.
Definition at line 82 of file sqldb.h. References name_. |
|
The name of the table containing this column. For a query result (i.e. a Dv::Sql::Command), the table can be defined by the ``as'' clause in a ``select'' statement. Definition at line 87 of file sqldb.h. References table_. |
|
The type of this field. The return value is dbms-dependent.
Definition at line 89 of file sqldb.h. References type_. |
|
The default value (see the constructor).
Definition at line 91 of file sqldb.h. References default_. |
|
Does the field have a numeric (int or float) type?
|
|
Does the field have an integer type?
Definition at line 96 of file sqldb.h. References int_. |
|
Does the field have floating point type?
Definition at line 98 of file sqldb.h. References float_. |
|
Does the field have a binary type?
Definition at line 100 of file sqldb.h. References binary_. |
|
Does the field have a string type?
Definition at line 102 of file sqldb.h. References string_. |
|
Convert mysql timestamp(14) value, e.g. 20010724110830 to Date.
|
|
Size of the field (in bytes).
Definition at line 107 of file sqldb.h. References size_. |
|
Print readable representation on ostream. Example: LONG[11] test.number STRING[32] test.word DATETIME[19] structuur2.wanneer VAR_STRING[100] structuur2.info TIMESTAMP[14] structuur2.time_stamp |
|
Definition at line 121 of file sqldb.h. Referenced by name(). |
|
Definition at line 122 of file sqldb.h. Referenced by table(). |
|
Definition at line 123 of file sqldb.h. Referenced by type(). |
|
Definition at line 124 of file sqldb.h. Referenced by defaultvalue(). |
|
|
|
|
|
Definition at line 128 of file sqldb.h. Referenced by text(). |
|
Definition at line 129 of file sqldb.h. Referenced by binary(). |
|
Definition at line 130 of file sqldb.h. Referenced by size(). |