Qore Programming Language Reference Manual  1.12.2
Old DBI Functions
Collaboration diagram for Old DBI Functions:

Modules

 DBI Functions
 
 SQL Constants
 

Functions

*int Qore::SQL::getDBIDriverCapabilities (string driver)
 Returns an integer representing the capabilities of a DBI driver binary-OR'ed together (see DBI Capability Constants) or NOTHING if the driver is not already loaded. More...
 
nothing Qore::SQL::getDBIDriverCapabilities ()
 This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments. More...
 
*list< stringQore::SQL::getDBIDriverCapabilityList (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...
 
nothing Qore::SQL::getDBIDriverCapabilityList ()
 This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments. More...
 
*list< stringQore::SQL::getDBIDriverList ()
 Returns a list of strings of DBI drivers currently loaded or NOTHING if no drivers are loaded. More...
 
hash Qore::SQL::parseDatasource (string ds)
 Returns a datasource hash of the components of a datasource string. More...
 
nothing Qore::SQL::parseDatasource ()
 This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments. More...
 
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< stringQore::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< stringQore::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...
 

Detailed Description

Old DBI functions; see DBI Functions

Function Documentation

◆ dbi_get_driver_capabilities()

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.

Code Flags:
CONSTANT
Parameters
driverthe name of the driver; if the given driver is not already loaded then this function returns NOTHING
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
Example:
int caps = dbi_get_driver_capabilities("pgsql");
int dbi_get_driver_capabilities(string driver)
Returns an integer representing the capabilities of a DBI driver binary-OR'ed together (see DBI Capab...
Note
similar to getDBIDriverCapabilities() except uses the standard function naming scheme (ie "names_like_this()" instead of "camelCase()"), always returns an int, and does not have a NOOP variant
Since
Qore 0.8.6

◆ dbi_get_driver_capability_list()

*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.

Code Flags:
CONSTANT
Parameters
driverthe name of the driver; if the given driver is not loaded then the function returns NOTHING
Returns
a list of each capability supported by the given DBI driver (see DBI Capability Constants) or NOTHING if the driver cannot be found
Example:
*list<string> l = dbi_get_driver_capability_list("pgsql");
*list< string > dbi_get_driver_capability_list(string driver)
Returns a list of each capability supported by the given DBI driver (see DBI Capability Constants) or...
Note
similar to getDBIDriverCapabilityList() except uses the standard function naming scheme (ie "names_like_this()" instead of "camelCase()") and does not have a NOOP variant
Since
Qore 0.8.6

◆ dbi_get_driver_list()

*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.

Returns
a list of strings of DBI drivers currently loaded or NOTHING if no drivers are loaded
Code Flags:
CONSTANT
Example:
*list<string> l = dbi_get_driver_list();
*list< string > dbi_get_driver_list()
Returns a list of strings of DBI drivers currently loaded or NOTHING if no drivers are loaded.
Note
similar to getDBIDriverList() except uses the standard function naming scheme (ie "names_like_this()" instead of "camelCase()")
Since
Qore 0.8.6

◆ dbi_get_driver_options()

*hash<auto> Qore::SQL::dbi_get_driver_options ( string  driver)

returns a hash of driver options

Code Flags:
CONSTANT
Parameters
driverthe name of the driver; if the given driver is not already loaded then this function returns NOTHING
Returns
if the given driver is not already loaded then the function returns NOTHING; if the driver does not support any options then an empty hash is returned, otherwise a hash is returned where the keys are valid option names, and the values are hashes with the following keys:
  • "desc": a string description of the option
  • "type": a string giving the data type restriction for the option
Example:
*hash<auto> h = dbi_get_driver_options("pgsql");
*hash< auto > dbi_get_driver_options(string driver)
returns a hash of driver options
Since
Qore 0.8.6

◆ getDBIDriverCapabilities() [1/2]

nothing Qore::SQL::getDBIDriverCapabilities ( )

This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments.

Code Flags:
NOOP, DEPRECATED

◆ getDBIDriverCapabilities() [2/2]

*int Qore::SQL::getDBIDriverCapabilities ( string  driver)

Returns an integer representing the capabilities of a DBI driver binary-OR'ed together (see DBI Capability Constants) or NOTHING if the driver is not already loaded.

Code Flags:
CONSTANT, DEPRECATED
Parameters
driverthe name of the driver; if the given driver is not already loaded then this function returns NOTHING
Returns
an integer representing the capabilities of a DBI driver binary-OR'ed together (see DBI Capability Constants) or NOTHING if the driver is not already loaded
Deprecated:
use dbi_get_driver_capabilities() instead; camel-case function names were deprecated in Qore 0.8.12

◆ getDBIDriverCapabilityList() [1/2]

nothing Qore::SQL::getDBIDriverCapabilityList ( )

This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments.

Code Flags:
NOOP, DEPRECATED

◆ getDBIDriverCapabilityList() [2/2]

*list<string> Qore::SQL::getDBIDriverCapabilityList ( 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.

Code Flags:
CONSTANT, DEPRECATED
Parameters
driverthe name of the driver; if the given driver is not loaded then the function returns NOTHING
Returns
a list of each capability supported by the given DBI driver (see DBI Capability Constants) or NOTHING if the driver cannot be found
Deprecated:
use dbi_get_driver_capability_list() instead; camel-case function names were deprecated in Qore 0.8.12

◆ getDBIDriverList()

*list<string> Qore::SQL::getDBIDriverList ( )

Returns a list of strings of DBI drivers currently loaded or NOTHING if no drivers are loaded.

Code Flags:
CONSTANT, DEPRECATED
Returns
a list of strings of DBI drivers currently loaded or NOTHING if no drivers are loaded
Deprecated:
use dbi_get_driver_list() instead; camel-case function names were deprecated in Qore 0.8.12

◆ parse_datasource()

hash<auto> Qore::SQL::parse_datasource ( string  ds)

Returns a datasource hash of the components of a datasource string.

Code Flags:
RET_VALUE_ONLY
Parameters
dsa string describing the datasource with the following syntax:
[driver:][user]:[/pass]@db[(charset)][%host[:port][{option=val[,...]}]
where all elements except @db are optional
Returns
a datasource hash of the components of a datasource string
Example:
hash<auto> h = parse_datasource("pgsql:user/pass@dbname(utf8)%dbhost.internal:1521{min=4,max=10}");
hash< auto > parse_datasource(string ds)
Returns a datasource hash of the components of a datasource string.
Exceptions
DATASOURCE-PARSE-ERRORa syntax error occurred parsing the datasource string (missing field, unexpected character, etc)
Note
similar to parseDatasource() except uses the standard function naming scheme (ie "names_like_this()" instead of "camelCase()") and does not have a NOOP variant
Since
Qore 0.8.6

◆ parseDatasource() [1/2]

nothing Qore::SQL::parseDatasource ( )

This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments.

Code Flags:
NOOP, DEPRECATED

◆ parseDatasource() [2/2]

hash Qore::SQL::parseDatasource ( string  ds)

Returns a datasource hash of the components of a datasource string.

Code Flags:
RET_VALUE_ONLY, DEPRECATED
Parameters
dsa string describing the datasource with the following syntax:
[driver:][user]:[/pass]@db[(charset)][%host[:port][{option=val[,...]}]
where all elements except @db are optional
Returns
a datasource hash of the components of a datasource string
Exceptions
DATASOURCE-PARSE-ERRORa syntax error occurred parsing the datasource string (missing field, unexpected character, etc)
Deprecated:
use parse_datasource() instead; camel-case function names were deprecated in Qore 0.8.12