jDbPDOConnectionDebug

Extends \jDbPDOConnection

A connection object based on PDO, for debugging

package

jelix

subpackage

db

Methods

Use a profile to do the connection

__construct(array $profile) 
inherited

Arguments

$profile

array

the profile data readed from the ini file

_parseSqlitePath

_parseSqlitePath( $path) 
inherited

Arguments

$path

enclose the field name

encloseName(string $fieldName) : string
inherited
since 1.1.2

Arguments

$fieldName

string

the field name

Response

string

the enclosed field name

exec

exec( $query) 

Arguments

$query

Check if the current connection has a table prefix set

hasTablePrefix() : boolean
inherited
author

Julien Issler

since 1.0

Response

boolean

return the maximum value of the given primary key in a table

lastIdInTable(string $fieldName, string $tableName) : integer
inherited

Arguments

$fieldName

string

the name of the primary key

$tableName

string

the name of the table

Response

integer

the maximum value

Get the ID of the last inserted row Mssql pdo driver does not support this feature.

lastInsertId(string $fromSequence = null) : string
inherited

so, we use a custom query

Arguments

$fromSequence

string

the sequence name, if needed

Response

string

Launch a SQL Query with limit parameter (so only a subset of a result)

limitQuery(string $queryString, integer $limitOffset = null, integer $limitCount = null) : \jDbPDOResultSet|boolean
inherited

Arguments

$queryString

string

the SQL query

$limitOffset

integer

the offset of the first row to return

$limitCount

integer

the maximum of number of rows to return

Response

\jDbPDOResultSet|boolean

SQL Select. False if the query has failed.

Create a limitQuery for the SQL server dbms

limitQuerySqlsrv(string $queryString, integer $limitOffset = null, integer $limitCount = null) : string
inherited

Arguments

$queryString

string

the SQL query

$limitOffset

integer

the offset of the first row to return

$limitCount

integer

the maximum of number of rows to return

Response

string

SQL Select.

Prefix the given table with the prefix specified in the connection's profile If there's no prefix for the connection's profile, return the table's name unchanged.

prefixTable( $table_name) : string
inherited
author

Julien Issler

since 1.0

Arguments

$table_name

Response

string

the prefixed table's name

query

query() 

Escape and quotes strings. if null, will only return the text "NULL"

quote2(string $text, boolean $checknull = true, boolean $binary = false) : string
inherited
since 1.2
todo

$binary parameter is not really supported, check if PDOConnection::quote supports binary strings

Arguments

$text

string

string to quote

$checknull

boolean

if true, check if $text is a null value, and then return NULL

$binary

boolean

set to true if $text contains a binary string

Response

string

escaped string

sets the autocommit state

setAutoCommit(boolean $state = true) 
inherited

Arguments

$state

boolean

the status of autocommit

tools

tools() : \jDbTools
inherited
Throws
\jException

Response

\jDbTools

Properties

_mysqlCharsets

_mysqlCharsets : 
inherited

Type(s)

_pgsqlCharsets

_pgsqlCharsets : 
inherited

Type(s)

the profile the connection is using

profile : array
inherited
var

Type(s)

array

The database type name (mysql, pgsql .

dbms : string
inherited

..) It is not the driver name. Several drivers could connect to the same database type. This type name is often used to know whish SQL language we should use.

var

Type(s)

string

driver name

driverName : string
inherited
var

Type(s)

string

_tools

_tools : \jDbTools
inherited
var

Type(s)

\jDbTools