Jelix 1.8.13

jDb
in package

factory for database connector and other db utilities.

Tags
subpackage

db

Table of Contents

_createConnector()  : jDbConnection|jDbPDOConnection
create a connector. internal use (callback method for jProfiles).
floatToStr()  : mixed
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.
getConnection()  : jDbConnection
return a database connector. It uses a temporay pool of connection to reuse currently opened connections.
getDbWidget()  : jDbWidget
create a new jDbWidget.
testProfile()  : bool
call it to test a profile (during an install for example).

Methods

floatToStr()

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.

public static floatToStr(mixed $value) : mixed
Parameters
$value : mixed
Tags
since
1.1.11
Return values
mixed

getConnection()

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

public static getConnection([string $name = '' ]) : jDbConnection
Parameters
$name : string = ''

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

Tags
Return values
jDbConnection

the connector

getDbWidget()

create a new jDbWidget.

public static getDbWidget([string $name = null ]) : jDbWidget
Parameters
$name : string = null

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

Tags
Return values
jDbWidget

testProfile()

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

public static testProfile(array<string|int, mixed> $profile) : bool
Parameters
$profile : array<string|int, mixed>

profile properties

Tags
Return values
bool

true if properties are ok

Search results