Database
class Database
Class Database
Methods
Create a new instance, using the provided connection information, either none for automatically a connection, a ConnectionWrapper instance (through ConnectionInterface) or a PDO connection.
Insert all sql needed in database Default insert /install/thelia.sql and /install/insert.sql
A simple wrapper around PDO::exec
Backup the db OR just a table
Restore a file in the current db
create database if not exists
No description
Details
at line 41
__construct(
ConnectionInterface|PDO|null $connection = null)
Create a new instance, using the provided connection information, either none for automatically a connection, a ConnectionWrapper instance (through ConnectionInterface) or a PDO connection.
at line 67
insertSql(
string $dbName = null,
array $extraSqlFiles = null)
Insert all sql needed in database Default insert /install/thelia.sql and /install/insert.sql
at line 105
PDOStatement
execute(
string $sql,
array $args = array())
A simple wrapper around PDO::exec
at line 151
backupDb(
string $filename,
string $tables = '*')
Backup the db OR just a table
at line 230
restoreDb(
string $filename)
Restore a file in the current db
at line 254
createDatabase($dbName)
create database if not exists