VisualIB
1.0
IBExpress library for making use of Borland IBExpress outside of C++Builder
|
VIB::DataSet wraps the VisualIB VIBDataSet C structure to provide a C++11 object with semantics compatible with those of Borland TIBDataSet. More...
#include <classVIBDataSet.h>
Classes | |
class | FieldByNameClass |
Class for VIB::DataSet::FieldByName method's return value. More... | |
class | FieldClass |
Fields property wrapper object. More... | |
class | FieldProp |
Intermediary for array-style access to fields, equivalent to the Borland TFields::Fields array. More... | |
class | FieldsClass |
Top-level Fields property wrapper class, equivalent to Borland TFields object. More... | |
class | SelectSQLClass |
Property implementation class for the SelectSQL property. More... | |
Public Member Functions | |
DataSet (VIBDataSet *pvds=NULL) | |
Construct a VIB::DataSet instance. | |
virtual | ~DataSet () |
Destroy the VIB::DataSet and the VIBDataSet instance it wraps. | |
void | Open () |
Opens the dataset. | |
void | First () |
Positions the cursor on the first record in the dataset and makes it the active record. | |
void | Next () |
Positions the cursor on the next record in the dataset and makes it the active record. | |
void | Close () |
Closes a dataset. | |
void | Prepare () |
Prepares all queries in the dataset to be executed. | |
bool | Eof () |
Returns true or false if the dataset is at Eof. | |
std::string | Plan () |
Undocumented method. | |
FieldByNameClass * | FieldByName (const std::string &fieldname) |
Finds a field based on its name. | |
Public Attributes | |
Property< VIBDatabase * > | Database |
Identifies the database component for which the dataset represents one or more tables. | |
Property< int > | FieldCount |
Indicates the number of field components associated with the dataset. | |
Property< FieldsClass * > | Fields |
Lists all non-aggregate field components of the dataset. | |
Property< SelectSQLClass * > | SelectSQL |
Provides the ability to directly access the SQL object encapsulating the SelectSQL statement. | |
Property< VIBTransaction * > | Transaction |
Identifies the transaction under which the query executes. | |
Property< bool > | UniDirectional |
Determines whether or not bidirectional cursors are enabled for a table. | |
Protected Attributes | |
VIBDataSet * | vds |
Pointer to the wrapped VIBDataSet instance. | |
FieldByNameClass | fbnc |
Instance of FieldByName property wrapper. | |
FieldsClass | fc |
Instance of Fields property wrapper. | |
SelectSQLClass | sql |
Instance of SelectSQL property wrapper. | |
Friends | |
class | FieldByNameClass |
class | FieldClass |
class | SelectSQLClass |
VIB::DataSet wraps the VisualIB VIBDataSet C structure to provide a C++11 object with semantics compatible with those of Borland TIBDataSet.
VIB::DataSet::DataSet | ( | VIBDataSet * | pvds = NULL | ) |
Construct a VIB::DataSet instance.
[in] | pvds | Optional pointer to an existing VIBDataSet structure of which this class instance should take ownership. |
void VIB::DataSet::Close | ( | ) |
Closes a dataset.
The Active property will be set to false, and data can no longer be read from or written to the database using this object.
bool VIB::DataSet::Eof | ( | ) |
Returns true or false if the dataset is at Eof.
VIB::DataSet::FieldByNameClass * VIB::DataSet::FieldByName | ( | const std::string & | fieldname | ) |
Finds a field based on its name.
If the specified field does not exist, an exception will be thrown.
[in] | fieldname | The name of a simple field, subfield of an object field qualified by the parent field's name, or name of an aggregated field. |
void VIB::DataSet::First | ( | ) |
Positions the cursor on the first record in the dataset and makes it the active record.
void VIB::DataSet::Next | ( | ) |
Positions the cursor on the next record in the dataset and makes it the active record.
Bof and Eof properties will be set to false. If the cursor was already on the last record in the dataset, the Eof property will be set to true.
void VIB::DataSet::Open | ( | ) |
Opens the dataset.
Call to set the Active property to true, and enable data to be read from and written to the database.
std::string VIB::DataSet::Plan | ( | ) |
Undocumented method.
void VIB::DataSet::Prepare | ( | ) |
Prepares all queries in the dataset to be executed.
Property<VIBDatabase *> VIB::DataSet::Database |
Identifies the database component for which the dataset represents one or more tables.
Property<int> VIB::DataSet::FieldCount |
Indicates the number of field components associated with the dataset.
For datasets with dynamically created fields, FieldCount may differ each time a dataset is opened. FieldCount includes only the fields listed by the Fields property. Any aggregated fields listed by the AggFields property are not included in the count.
Property<FieldsClass *> VIB::DataSet::Fields |
Lists all non-aggregate field components of the dataset.
If fields are generated dynamically at runtime, the order of field components in Fields corresponds directly to the order of columns in the table or tables underlying a dataset.
Property<SelectSQLClass *> VIB::DataSet::SelectSQL |
Provides the ability to directly access the SQL object encapsulating the SelectSQL statement.
Property<VIBTransaction *> VIB::DataSet::Transaction |
Identifies the transaction under which the query executes.
Property<bool> VIB::DataSet::UniDirectional |
Determines whether or not bidirectional cursors are enabled for a table.