Qore Programming Language Reference Manual 1.17.0
|
Functions | |
int | Qore::SQL::dbi_get_driver_capabilities (string driver) |
Returns an integer representing the capabilities of a DBI driver binary-OR'ed together (see DBI Capability Constants) or 0 if the driver is not already loaded. More... | |
*list< string > | Qore::SQL::dbi_get_driver_capability_list (string driver) |
Returns a list of each capability supported by the given DBI driver (see DBI Capability Constants) or NOTHING if the driver cannot be found. More... | |
*list< string > | Qore::SQL::dbi_get_driver_list () |
Returns a list of strings of DBI drivers currently loaded or NOTHING if no drivers are loaded. More... | |
*hash< auto > | Qore::SQL::dbi_get_driver_options (string driver) |
returns a hash of driver options More... | |
hash< auto > | Qore::SQL::parse_datasource (string ds) |
Returns a datasource hash of the components of a datasource string. More... | |
These DBI functions were added in Qore 0.8.6; the original functions used camel case names and had NOOP variants (see Old DBI Functions)
Key | Description |
type | the name of the driver, if present |
user | the username given in the string |
pass | the password for the connection |
db | the database name for the connection |
charset | The name of the DB-specific character encoding to use for the connection, if present in the string |
host | the hostname for the connection, if present in the string |
port | the port number to use for the connection, if present in the string |
options | A hash of options given in the string, if present. Special options are "min" and "max" , which are respected by the DatasourcePool::constructor(hash) variant for setting the minimum and maximum connections in the pool, respectively; other options are passed to the DBI driver |
Returns an integer representing the capabilities of a DBI driver binary-OR'ed together (see DBI Capability Constants) or 0 if the driver is not already loaded.
driver | the name of the driver; if the given driver is not already loaded then this function returns NOTHING |
"names_like_this()"
instead of "camelCase()"
), always returns an int, and does not have a NOOP variantReturns a list of each capability supported by the given DBI driver (see DBI Capability Constants) or NOTHING if the driver cannot be found.
driver | the name of the driver; if the given driver is not loaded then the function returns NOTHING |
"names_like_this()"
instead of "camelCase()"
) and does not have a NOOP variantReturns a list of strings of DBI drivers currently loaded or NOTHING if no drivers are loaded.
"names_like_this()"
instead of "camelCase()"
)returns a hash of driver options
driver | the name of the driver; if the given driver is not already loaded then this function returns NOTHING |
"desc"
: a string description of the option"type"
: a string giving the data type restriction for the optionReturns a datasource hash of the components of a datasource string.
ds | a string describing the datasource with the following syntax:[ driver:][ user/ pass]@ db[( charset)][% host[: port][{ option= val[,...]}] where all elements except @ db are optional |
DATASOURCE-PARSE-ERROR | a syntax error occurred parsing the datasource string (missing field, unexpected character, etc) |
"names_like_this()"
instead of "camelCase()"
) and does not have a NOOP variant