Class RPDO
PDO Driver This Driver implements the RedBean Driver API. for RedBeanPHP. This is the standard / default database driver for RedBeanPHP.
- RedBeanPHP\Driver\RPDO implements RedBeanPHP\Driver
Copyright:
copyright (c) Desfrenes & Gabor de Mooij and the RedBeanPHP community This source file is subject to the BSD/GPLv2 License that is bundled with this source code in the file license.txt.
License: BSD/GPLv2
Author: Gabor de Mooij and the RedBeanPHP Community, Desfrenes
File: RedBeanPHP/PDO.php
Located at Driver/RPDO.php
protected
|
#
bindParams( PDOStatement $statement, array $bindings )
Binds parameters. This method binds parameters to a PDOStatement for Query Execution. This method binds parameters as NULL, INTEGER or STRING and supports both named keys and question mark keys. |
protected
mixed
|
#
runQuery( string $sql, array $bindings, array $options = array() )
This method runs the actual SQL query and binds a list of parameters to the query. slots. The result of the query will be stored in the protected property $rs (always array). The number of rows affected (result of rowcount, if supported by database) is stored in protected property $affectedRows. If the debug flag is set this function will send debugging output to screen buffer. |
protected
|
#
setEncoding( )
Try to fix MySQL character encoding problems. MySQL < 5.5 does not support proper 4 byte unicode but they seem to have added it with version 5.5 under a different label: utf8mb4. We try to select the best possible charset based on your version data. |
public
|
#
__construct( string|object $dsn, string $user = NULL, string $pass = NULL )
Constructor. You may either specify dsn, user and password or just give an existing PDO connection. |
public
string
|
|
public
|
#
setUseStringOnlyBinding( boolean $yesNo )
Whether to bind all parameters as strings. If set to TRUE this will cause all integers to be bound as STRINGS. This will NOT affect NULL values. |
public
integer
|
#
setMaxIntBind( integer $max )
Sets the maximum value to be bound as integer, normally this value equals PHP's MAX INT constant, however sometimes PDO driver bindings cannot bind large integers as integers. This method allows you to manually set the max integer binding value to manage portability/compatibility issues among different PHP builds. This method will return the old value. |
public
|
|
public
|
#
setPDO( PDO $pdo )
Directly sets PDO instance into driver. This method might improve performance, however since the driver does not configure this instance terrible things may happen... only use this method if you are an expert on RedBeanPHP, PDO and UTF8 connections and you know your database server VERY WELL. |
public
array
|
|
public
mixed
|
|
public
array
|
|
public
mixed
|
|
public
mixed
|
|
public
array
|
|
public
array
|
|
public
integer
|
|
public
mixed
|
|
public
integer
|
|
public
|
#
setDebugMode( boolean $tf,
Toggles debug mode. In debug mode the driver will print all SQL to the screen together with some information about the results. |
public
|
#
setLogger(
Injects Logger object. Sets the logger instance you wish to use. |
public
|
|
public
|
|
public
|
|
public
|
|
public
string
|
#
getDatabaseType( )
Returns the name of database driver for PDO. Uses the PDO attribute DRIVER NAME to obtain the name of the PDO driver. |
public
mixed
|
|
public
PDO
|
|
public
|
|
public
boolean
|
|
public
|
|
public
|
|
public
integer
|
|
public
integer
|
protected
integer
|
$max
|
|
protected
string
|
$dsn
|
|
protected
boolean
|
$loggingEnabled
|
#
FALSE
|
protected
|
$logger
|
#
NULL
|
protected
PDO
|
$pdo
|
|
protected
integer
|
$affectedRows
|
|
protected
integer
|
$resultArray
|
|
protected
array
|
$connectInfo
|
#
array()
|
protected
boolean
|
$isConnected
|
#
FALSE
|
protected
boolean
|
$flagUseStringOnlyBinding
|
#
FALSE
|
protected
integer
|
$queryCounter
|
#
0
|
protected
string
|
$mysqlEncoding
|
#
''
|