Qore SqlUtil Module Reference
1.7.5
|
represents a database; this class embeds an AbstractDatabase 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 > opts) | |
creates the Database object More... | |
constructor (hash ds, *hash< auto > opts) | |
creates the AbstractDatabase object More... | |
constructor (string ds, *hash< auto > opts) | |
creates the AbstractDatabase object More... | |
SqlUtil::AbstractDatabase | getDatabase () |
gets the underlying AbstractDatabase | |
auto | methodGate (string meth) |
executes a method on the contained AbstractDatabase object | |
Private Attributes | |
AbstractDatabase | db |
the embedded AbstractDatabase object that actually provides the functionality for this class | |
represents a database; this class embeds an AbstractDatabase 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 AbstractDatabase 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::Database::constructor | ( | AbstractDatasource | ds, |
*hash< auto > | opts | ||
) |
creates the Database object
ds | the AbstractDatasource object used to provide the DB connection |
opts | a hash of options for the function creation string; see AbstractDatabase::DatabaseOptions for common options; each driver can support additional driver-specific options |
DATABASE-DRIVER-ERROR | no database-specific module can be loaded |
OPTION-ERROR | invalid or unsupported option passed |
creates the AbstractDatabase 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):
|
opts | a hash of options for the table creation string; see AbstractDatabase::DatabaseOptions for common options; each driver can support additional driver-specific options |
OPTION-ERROR | invalid or unsupported option passed |
creates the AbstractDatabase object
ds | a datasource description string in the format that can be parsed by parse_datasource() |
opts | a hash of options for the function creation string; see AbstractDatabase::DatabaseOptions for common options; each driver can support additional driver-specific options |
OPTION-ERROR | invalid or unsupported option passed |