jDb

factory for database connector and other db utilities

package

jelix

subpackage

db

Methods

create a connector. internal use (callback method for jProfiles)

_createConnector(array $profile) : \jDbConnection|\jDbPDOConnection
static
Throws
\jException

Arguments

$profile

array

profile properties

Response

\jDbConnection|\jDbPDOConnection

database connector

perform a convertion float to str. It takes care about the decimal separator which should be a '.' for SQL. Because when doing a native convertion float->str, PHP uses the local decimal separator, and so, we don't want that.

floatToStr( $value) 
static
since 1.1.11

Arguments

$value

return a database connector. It uses a temporay pool of connection to reuse currently opened connections.

getConnection(string $name = '') : \jDbConnection
static

Arguments

$name

string

profile name to use. if empty, use the default one

Response

\jDbConnection

the connector

create a new jDbWidget

getDbWidget(string $name = null) : \jDbWidget
static

Arguments

$name

string

profile name to use. if empty, use the default one

Response

\jDbWidget

call it to test a profile (during an install for example)

testProfile(array $profile) : boolean

Arguments

$profile

array

profile properties

Response

boolean

true if properties are ok