PHP Class Doctrine\DBAL\Driver\OCI8\OCI8Statement

Since: 2.0
Author: Roman Borschel ([email protected])
Inheritance: implements Doctrine\DBAL\Driver\Statement
Afficher le fichier Open project: doctrine/dbal Class Usage Examples

Protected Properties

Свойство Type Description
$_PARAM string
$_conn Doctrine\DBAL\Driver\OCI8\OCI8Connection
$_dbh resource
$_defaultFetchMode integer
$_paramMap array
$_sth resource
$fetchModeMap array

Méthodes publiques

Méthode Description
__construct ( resource $dbh, string $statement, Doctrine\DBAL\Driver\OCI8\OCI8Connection $conn ) Creates a new OCI8Statement that uses the given connection handle and SQL statement.
bindParam ( $column, &$variable, $type = null, $length = null )
bindValue ( $param, $value, $type = null )
closeCursor ( )
columnCount ( )
convertPositionalToNamedPlaceholders ( string $statement ) : string Converts positional (?) into named placeholders (:param).
errorCode ( )
errorInfo ( )
execute ( $params = null )
fetch ( $fetchMode = null )
fetchAll ( $fetchMode = null )
fetchColumn ( $columnIndex )
getIterator ( )
rowCount ( )
setFetchMode ( $fetchMode, $arg2 = null, $arg3 = null )

Method Details

__construct() public méthode

Creates a new OCI8Statement that uses the given connection handle and SQL statement.
public __construct ( resource $dbh, string $statement, Doctrine\DBAL\Driver\OCI8\OCI8Connection $conn )
$dbh resource The connection handle.
$statement string The SQL statement.
$conn Doctrine\DBAL\Driver\OCI8\OCI8Connection

bindParam() public méthode

public bindParam ( $column, &$variable, $type = null, $length = null )

bindValue() public méthode

public bindValue ( $param, $value, $type = null )

closeCursor() public méthode

public closeCursor ( )

columnCount() public méthode

public columnCount ( )

convertPositionalToNamedPlaceholders() public static méthode

Oracle does not support positional parameters, hence this method converts all positional parameters into artificially named parameters. Note that this conversion is not perfect. All question marks (?) in the original statement are treated as placeholders and converted to a named parameter. The algorithm uses a state machine with two possible states: InLiteral and NotInLiteral. Question marks inside literal strings are therefore handled correctly by this method. This comes at a cost, the whole sql statement has to be looped over.
public static convertPositionalToNamedPlaceholders ( string $statement ) : string
$statement string The SQL statement to convert.
Résultat string

errorCode() public méthode

public errorCode ( )

errorInfo() public méthode

public errorInfo ( )

execute() public méthode

public execute ( $params = null )

fetch() public méthode

public fetch ( $fetchMode = null )

fetchAll() public méthode

public fetchAll ( $fetchMode = null )

fetchColumn() public méthode

public fetchColumn ( $columnIndex )

getIterator() public méthode

public getIterator ( )

rowCount() public méthode

public rowCount ( )

setFetchMode() public méthode

public setFetchMode ( $fetchMode, $arg2 = null, $arg3 = null )

Property Details

$_PARAM protected_oe static_oe property

protected static string $_PARAM
Résultat string

$_conn protected_oe property

protected OCI8Connection,Doctrine\DBAL\Driver\OCI8 $_conn
Résultat Doctrine\DBAL\Driver\OCI8\OCI8Connection

$_dbh protected_oe property

protected resource $_dbh
Résultat resource

$_defaultFetchMode protected_oe property

protected int $_defaultFetchMode
Résultat integer

$_paramMap protected_oe property

protected array $_paramMap
Résultat array

$_sth protected_oe property

protected resource $_sth
Résultat resource

$fetchModeMap protected_oe static_oe property

protected static array $fetchModeMap
Résultat array