Public Member Functions | |
virtual | ~Data_row_provider () |
Destructor. | |
virtual int | cols ()=0 |
Get number of columns in a row. | |
virtual const wxString | col_name (int idx)=0 |
Get field name by column index. | |
virtual int | col_idx (const wxString &field)=0 |
Get column index by name. | |
virtual int | type_simple (int idx)=0 |
Returns type of column (for built in types only). | |
virtual int | type_simple (const wxString &field)=0 |
Returns type of field (for built in types only). | |
virtual bool | null (int idx)=0 |
Check if field value is NULL. | |
virtual bool | null (const wxString &field)=0 |
Check if field value is NULL. | |
virtual int | get_int (int idx)=0 |
Returns column value as integer. | |
virtual int | get_int (const wxString &field)=0 |
Returns column value as integer. | |
virtual double | get_float (int idx)=0 |
Returns column value as double. | |
virtual double | get_float (const wxString &field)=0 |
Returns column value as double. | |
virtual const wxString | get_str (int idx)=0 |
Returns column value as wxString. | |
virtual const wxString | get_str (const wxString &field)=0 |
Returns column value as wxString. | |
virtual const wxDateTime | get_date (int idx)=0 |
Returns column value as date. | |
virtual const wxDateTime | get_date (const wxString &field)=0 |
Returns column value as date. | |
virtual const wxDateTime | get_time (int idx)=0 |
Returns column value as time. | |
virtual const wxDateTime | get_time (const wxString &field)=0 |
Returns column value as time. | |
virtual const wxDateTime | get_date_time (int idx)=0 |
Returns column value as date&time. | |
virtual const wxDateTime | get_date_time (const wxString &field)=0 |
Returns column value as date&time. | |
virtual bool | get_bool (int idx)=0 |
Returns column value as bool (intended for boolean type columns). | |
virtual bool | get_bool (const wxString &field)=0 |
Returns column value as bool (intended for boolean type columns). |
virtual wxPg::Data_row_provider::~Data_row_provider | ( | ) | [inline, virtual] |
Destructor.
virtual int wxPg::Data_row_provider::cols | ( | ) | [pure virtual] |
Get number of columns in a row.
Implemented in wxPg::Cached_result, and wxPg::Data_row.
virtual const wxString wxPg::Data_row_provider::col_name | ( | int | idx | ) | [pure virtual] |
Get field name by column index.
idx | - column index. |
Implemented in wxPg::Cached_result, and wxPg::Data_row.
virtual int wxPg::Data_row_provider::col_idx | ( | const wxString & | field | ) | [pure virtual] |
Get column index by name.
field | - field name. |
Implemented in wxPg::Cached_result, and wxPg::Data_row.
virtual int wxPg::Data_row_provider::type_simple | ( | int | idx | ) | [pure virtual] |
Returns type of column (for built in types only).
If type of column is not built in or there is no column whith such index, wxPg::TYPE_UNKNOWN is returned. See type.h.
idx | - column index. |
Implemented in wxPg::Cached_result, and wxPg::Data_row.
virtual int wxPg::Data_row_provider::type_simple | ( | const wxString & | field | ) | [pure virtual] |
Returns type of field (for built in types only).
If type of column is not built in or there is no such field ir a row, wxPg::TYPE_UNKNOWN is returned. See type.h.
field | - field name. |
Implemented in wxPg::Cached_result, and wxPg::Data_row.
virtual bool wxPg::Data_row_provider::null | ( | int | idx | ) | [pure virtual] |
Check if field value is NULL.
idx | - column index. |
Implemented in wxPg::Cached_result, and wxPg::Data_row.
virtual bool wxPg::Data_row_provider::null | ( | const wxString & | field | ) | [pure virtual] |
Check if field value is NULL.
field | - field name. |
Implemented in wxPg::Cached_result, and wxPg::Data_row.
virtual int wxPg::Data_row_provider::get_int | ( | int | idx | ) | [pure virtual] |
Returns column value as integer.
If value is NULL and in case of error 0 is returned.
idx | - column index. |
Implemented in wxPg::Cached_result, and wxPg::Data_row.
virtual int wxPg::Data_row_provider::get_int | ( | const wxString & | field | ) | [pure virtual] |
Returns column value as integer.
If value is NULL and in case of error 0 is returned.
field | - field name. |
Implemented in wxPg::Cached_result, and wxPg::Data_row.
virtual double wxPg::Data_row_provider::get_float | ( | int | idx | ) | [pure virtual] |
Returns column value as double.
If value is NULL and in case of error 0.0 is returned.
idx | - column index. |
Implemented in wxPg::Cached_result, and wxPg::Data_row.
virtual double wxPg::Data_row_provider::get_float | ( | const wxString & | field | ) | [pure virtual] |
Returns column value as double.
If value is NULL and in case of error 0.0 is returned.
field | - field name. |
Implemented in wxPg::Cached_result, and wxPg::Data_row.
virtual const wxString wxPg::Data_row_provider::get_str | ( | int | idx | ) | [pure virtual] |
Returns column value as wxString.
If value is NULL and in case of error empty string is returned.
idx | - column index. |
Implemented in wxPg::Cached_result, and wxPg::Data_row.
virtual const wxString wxPg::Data_row_provider::get_str | ( | const wxString & | field | ) | [pure virtual] |
Returns column value as wxString.
If value is NULL and in case of error empty string is returned.
field | - field name. |
Implemented in wxPg::Cached_result, and wxPg::Data_row.
virtual const wxDateTime wxPg::Data_row_provider::get_date | ( | int | idx | ) | [pure virtual] |
Returns column value as date.
If value is NULL and in case of error new wxDateTime object is returned.
idx | - column index. |
Implemented in wxPg::Cached_result, and wxPg::Data_row.
virtual const wxDateTime wxPg::Data_row_provider::get_date | ( | const wxString & | field | ) | [pure virtual] |
Returns column value as date.
If value is NULL and in case of error new wxDateTime object is returned.
field | - field name. |
Implemented in wxPg::Cached_result, and wxPg::Data_row.
virtual const wxDateTime wxPg::Data_row_provider::get_time | ( | int | idx | ) | [pure virtual] |
Returns column value as time.
If value is NULL and in case of error new wxDateTime object is returned.
idx | - column index. |
Implemented in wxPg::Cached_result, and wxPg::Data_row.
virtual const wxDateTime wxPg::Data_row_provider::get_time | ( | const wxString & | field | ) | [pure virtual] |
Returns column value as time.
If value is NULL and in case of error new wxDateTime object is returned.
field | - field name. |
Implemented in wxPg::Cached_result, and wxPg::Data_row.
virtual const wxDateTime wxPg::Data_row_provider::get_date_time | ( | int | idx | ) | [pure virtual] |
Returns column value as date&time.
If value is NULL and in case of error new wxDateTime object is returned.
idx | - column index. |
Implemented in wxPg::Cached_result, and wxPg::Data_row.
virtual const wxDateTime wxPg::Data_row_provider::get_date_time | ( | const wxString & | field | ) | [pure virtual] |
Returns column value as date&time.
If value is NULL and in case of error new wxDateTime object is returned.
field | - field name. |
Implemented in wxPg::Cached_result, and wxPg::Data_row.
virtual bool wxPg::Data_row_provider::get_bool | ( | int | idx | ) | [pure virtual] |
Returns column value as bool (intended for boolean type columns).
NULL is interpreted as false.
For numeric fields, 0 is interpreted as false, anything else as true.
For string fields, empty string is false, non empty is true.
idx | - column index. |
Implemented in wxPg::Cached_result, and wxPg::Data_row.
virtual bool wxPg::Data_row_provider::get_bool | ( | const wxString & | field | ) | [pure virtual] |
Returns column value as bool (intended for boolean type columns).
NULL is interpreted as false.
For numeric fields, 0 is interpreted as false, anything else as true.
For string fields, empty string is false, non empty is true.
field | - field name. |
Implemented in wxPg::Cached_result, and wxPg::Data_row.