PHP 클래스 jDbPDOConnection

저자: Laurent Jouanneau
상속: extends PDO
파일 보기 프로젝트 열기: jelix/jelix 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$dbms string ..) 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.
$driverName string driver name
$profile array the profile the connection is using

보호된 프로퍼티들

프로퍼티 타입 설명
$_schema jDbSchema
$_tools jDbTools

공개 메소드들

메소드 설명
__construct ( array $profile ) Use a profile to do the connection
encloseName ( string $fieldName ) : string enclose the field name
hasTablePrefix ( ) : boolean Check if the current connection has a table prefix set
lastIdInTable ( string $fieldName, string $tableName ) : integer return the maximum value of the given primary key in a table
lastInsertId ( string $fromSequence = null ) : string Get the ID of the last inserted row Mssql pdo driver does not support this feature.
limitQuery ( string $queryString, integer $limitOffset = null, integer $limitCount = null ) : jDbPDOResultSet | boolean Launch a SQL Query with limit parameter (so only a subset of a result)
prefixTable ( $table_name ) : string 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.
query ( )
quote2 ( string $text, boolean $checknull = true, boolean $binary = false ) : string Escape and quotes strings. if null, will only return the text "NULL"
schema ( ) : jDbSchema
setAutoCommit ( boolean $state = true ) sets the autocommit state
tools ( ) : jDbTools

보호된 메소드들

메소드 설명
_parseSqlitePath ( $path )

메소드 상세

__construct() 공개 메소드

Use a profile to do the connection
public __construct ( array $profile )
$profile array the profile data. Its content must be normalized by jDbParameters

_parseSqlitePath() 보호된 메소드

protected _parseSqlitePath ( $path )

encloseName() 공개 메소드

enclose the field name
부터: 1.1.2
public encloseName ( string $fieldName ) : string
$fieldName string the field name
리턴 string the enclosed field name

hasTablePrefix() 공개 메소드

Check if the current connection has a table prefix set
부터: 1.0
저자: Julien Issler
public hasTablePrefix ( ) : boolean
리턴 boolean

lastIdInTable() 공개 메소드

return the maximum value of the given primary key in a table
public lastIdInTable ( string $fieldName, string $tableName ) : integer
$fieldName string the name of the primary key
$tableName string the name of the table
리턴 integer the maximum value

lastInsertId() 공개 메소드

so, we use a custom query
public lastInsertId ( string $fromSequence = null ) : string
$fromSequence string the sequence name, if needed
리턴 string

limitQuery() 공개 메소드

Launch a SQL Query with limit parameter (so only a subset of a result)
public limitQuery ( string $queryString, integer $limitOffset = null, integer $limitCount = null ) : jDbPDOResultSet | boolean
$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
리턴 jDbPDOResultSet | boolean SQL Select. False if the query has failed.

prefixTable() 공개 메소드

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.
부터: 1.0
저자: Julien Issler
public prefixTable ( $table_name ) : string
리턴 string the prefixed table's name

query() 공개 메소드

public query ( )

quote2() 공개 메소드

Escape and quotes strings. if null, will only return the text "NULL"
부터: 1.2
public quote2 ( string $text, boolean $checknull = true, boolean $binary = false ) : string
$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
리턴 string escaped string

schema() 공개 메소드

public schema ( ) : jDbSchema
리턴 jDbSchema

setAutoCommit() 공개 메소드

sets the autocommit state
public setAutoCommit ( boolean $state = true )
$state boolean the status of autocommit

tools() 공개 메소드

public tools ( ) : jDbTools
리턴 jDbTools

프로퍼티 상세

$_schema 보호되어 있는 프로퍼티

protected jDbSchema $_schema
리턴 jDbSchema

$_tools 보호되어 있는 프로퍼티

protected jDbTools $_tools
리턴 jDbTools

$dbms 공개적으로 프로퍼티

..) 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.
public string $dbms
리턴 string

$driverName 공개적으로 프로퍼티

driver name
public string $driverName
리턴 string

$profile 공개적으로 프로퍼티

the profile the connection is using
public array $profile
리턴 array