Qore SqlUtil Module Reference
1.7.5
|
represents a database table; this class embeds an AbstractTable object that is created automatically in the constructor based on the database driver for the AbstractDatasource object providing the database connection More...
Public Member Methods | |
constructor (AbstractDatasource ds, hash< auto > desc, string name, *hash< auto > opts) | |
creates the object from a table description hash More... | |
constructor (AbstractDatasource ds, string name, *hash< auto > opts) | |
creates the Table object More... | |
constructor (hash< auto > ds, string name, *hash< auto > opts) | |
creates the Table object More... | |
constructor (string ds, string name, *hash< auto > opts) | |
creates the Table object More... | |
AbstractTable | getTable () |
returns the AbstractTable object contained by this object | |
auto | methodGate (string meth) |
executes a method on the contained AbstractTable object More... | |
Private Attributes | |
AbstractTable | t |
the embedded AbstractTable object that actually provides the functionality for this class | |
represents a database table; this class embeds an AbstractTable object that is created automatically in the constructor based on the database driver for the AbstractDatasource object providing the database connection
Driver-specific modules that provide the AbstractTable implementation embedded in this class are loaded on demand based on the driver's name. The driver-specific module's name is generated based on the db-driver's name with the first letter capitalized then with "SqlUtil"
appended.
For example:
"oracle"
: OracleSqlUtil"pgsql"
: PgsqlSqlUtil"mysql"
: MysqlSqlUtiletc.
SqlUtil::Table::constructor | ( | AbstractDatasource | ds, |
hash< auto > | desc, | ||
string | name, | ||
*hash< auto > | opts | ||
) |
creates the object from a table description hash
ds | the AbstractDatasource for the connection to the database |
desc | a table description hash describing the table |
name | the name of the table |
opts | an optional hash of options for the table creation string; see SqlUtil::AbstractTable::TableOptions for common options; each driver can support additional driver-specific options |
OPTION-ERROR | invalid or unsupported option passed |
DESCRIPTION-ERROR | invalid or unsupported description hash value passed |
creates the Table object
ds | the AbstractDatasource object used to provide the DB connection |
name | the name of the table |
opts | a hash of options for the table creation string; see SqlUtil::AbstractTable::TableOptions for common options; each driver can support additional driver-specific options |
TABLE-DRIVER-ERROR | no database-specific module can be loaded |
OPTION-ERROR | invalid or unsupported option passed |
creates the Table object
ds | a hash giving parameters for the new datasource with the following possible keys (the "type" key is mandatory, also usable with the output of the parse_datasource() function):
|
name | the name of the table |
opts | a hash of options for the table creation string; see SqlUtil::AbstractTable::TableOptions for common options; each driver can support additional driver-specific options |
TABLE-DRIVER-ERROR | no database-specific module can be loaded |
OPTION-ERROR | invalid or unsupported option passed |
creates the Table object
ds | a datasource description string in the format that can be parsed by parse_datasource() |
name | the name of the table |
opts | a hash of options for the table creation string; see SqlUtil::AbstractTable::TableOptions for common options; each driver can support additional driver-specific options |
TABLE-DRIVER-ERROR | no database-specific module can be loaded |
OPTION-ERROR | invalid or unsupported option passed |
auto SqlUtil::Table::methodGate | ( | string | meth | ) |
executes a method on the contained AbstractTable object
See SqlUtil::AbstractTable API for reference