Methods summary
public static
|
#
init( array $databases_configuration = NULL )
Prepares database connections as aliases.
This method will be call automatically when the class is loaded.
Prepares database connections as aliases.
This method will be call automatically when the class is loaded.
Parameters
- $databases_configuration
- Let it NULL in order to use databases configuration file
|
public static
|
#
setMain( string $alias )
Sets a new main database
Parameters
Throws
|
public static
Adi\QuickPDO\DB
|
#
alias( string $alias )
Returns database instance for alias
Returns database instance for alias
Parameters
Returns
Throws
|
public static
array
|
|
public static
Adi\QuickPDO\DB
|
#
main( )
Returns main database instance
Returns main database instance
Returns
|
public
|
|
public
array
|
#
getConfig( )
Returns main configuration
Returns main configuration
Returns
array
|
public
string
|
#
getName( )
Returns database name
Returns
string
|
public
PDO
|
#
getConnection( )
Returns instance of PDO connection
Returns instance of PDO connection
Returns
PDO
|
public
Adi\QuickPDO\Engine
|
|
public
Adi\QuickPDO\Schema
|
#
getSchema( )
Returns instans of database schema
Returns instans of database schema
Returns
|
public
string
|
#
getType( )
Returns database type
Returns
string
|
public
PDOStatement
|
#
query( string $sql, mixed $inputs_parameters = array() )
Performs sql sequence
Parameters
- $sql
- $inputs_parameters
- Simple input parameter or array of inputs
Returns
PDOStatement
|
public
array
&
|
#
fetch( string $sql, mixed $inputs_parameters = array() )
Performs sql sequence
Parameters
- $sql
- $inputs_parameters
- Simple input parameter or array of inputs
Returns
array
|
public
|
#
execute( string $sql, mixed $inputs_parameters = array() )
Performs sql sequence
Parameters
- $sql
- $inputs_parameters
- Simple input parameter or array of inputs
|
public
array|false
&
|
#
row( string $sql, mixed $inputs_parameters = array() )
Performs sql sequence and return the first row
Performs sql sequence and return the first row
Parameters
Returns
array|false Returns FALSE if no query result
|
public
string|false
&
|
#
value( string $sql, mixed $inputs_parameters = array() )
Performs sql sequence and return the first of the first row
Performs sql sequence and return the first of the first row
Parameters
Returns
string|false Returns FALSE if no query result
|
public
miexd
|
#
insert( string $table, array $data )
Inserts a new record into table
Inserts a new record into table
Parameters
- $table
- Table name
- $data
- New record as associative table
Returns
miexd Id of inserted record (not supported for composite primary key).
|
public
|
#
update( string $table, array $data, mixed $where )
Update a record in table
Parameters
- $table
- Table name
- $data
- New record as associative table
- $where
- Where expression as string, associative array, or instance of Where
|
public
|
#
updateAll( string $table, array $data )
Update all records in table
Update all records in table
Parameters
- $table
- Table name
- $data
- New record as associative table
|