FacturaScripts

DataBaseEngine
in package

Interface for each of the compatible database engines

Tags
author

Carlos García Gómez [email protected]

author

Jose Antonio Cuello Principal [email protected]

Table of Contents

$i18n  : Translator
Contains the translator.
$lastErrorMsg  : string
Last error message.
__construct()  : mixed
beginTransaction()  : mixed
Starts a transaction with the $link connection
castInteger()  : mixed
Cast the column to a number
close()  : mixed
Closes the connection to the database
columnFromData()  : mixed
Converts the sqlColumns returned data to a working structure
commit()  : mixed
Commits operations done in the connection since beginTransaction
compareDataTypes()  : bool
Compares the data types from a numeric column. Returns true if they are equal
connect()  : mixed
Connects to the database
dateStyle()  : string
Returns the date format from the database engine
errorMessage()  : mixed
Last generated error message in a database operation
escapeColumn()  : mixed
Escape the given column name
escapeString()  : mixed
Escape the given string
exec()  : bool
Runs a DDL statement on the connection.
getOperator()  : string
Indicates the operator for the database engine.
getSQL()  : DataBaseQueries
Returns the link to the engine's SQL class
inTransaction()  : mixed
Indicates if the connection has an open transaction
listTables()  : mixed
List the existing tables in the connection
rollback()  : mixed
Rolls back operations done in the connection since beginTransaction
select()  : array<string|int, mixed>
Runs a database statement on the connection
updateSequence()  : mixed
version()  : string
Database engine information

Properties

$lastErrorMsg

Last error message.

protected string $lastErrorMsg = ''

Methods

__construct()

public __construct() : mixed
Return values
mixed

beginTransaction()

Starts a transaction with the $link connection

public abstract beginTransaction(mixed $link) : mixed
Parameters
$link : mixed
Return values
mixed

castInteger()

Cast the column to a number

public abstract castInteger(mixed $link, string $column) : mixed
Parameters
$link : mixed
$column : string
Return values
mixed

close()

Closes the connection to the database

public abstract close(mixed $link) : mixed
Parameters
$link : mixed
Return values
mixed

columnFromData()

Converts the sqlColumns returned data to a working structure

public abstract columnFromData(array<string|int, mixed> $colData) : mixed
Parameters
$colData : array<string|int, mixed>
Return values
mixed

commit()

Commits operations done in the connection since beginTransaction

public abstract commit(mixed $link) : mixed
Parameters
$link : mixed
Return values
mixed

compareDataTypes()

Compares the data types from a numeric column. Returns true if they are equal

public compareDataTypes(string $dbType, string $xmlType) : bool
Parameters
$dbType : string
$xmlType : string
Return values
bool

connect()

Connects to the database

public abstract connect(string &$error) : mixed
Parameters
$error : string
Return values
mixed

dateStyle()

Returns the date format from the database engine

public dateStyle() : string
Return values
string

errorMessage()

Last generated error message in a database operation

public abstract errorMessage(mixed $link) : mixed
Parameters
$link : mixed
Return values
mixed

escapeColumn()

Escape the given column name

public abstract escapeColumn(mixed $link, string $name) : mixed
Parameters
$link : mixed
$name : string
Return values
mixed

escapeString()

Escape the given string

public abstract escapeString(mixed $link, string $str) : mixed
Parameters
$link : mixed
$str : string
Return values
mixed

exec()

Runs a DDL statement on the connection.

public abstract exec(mixed $link, string $sql) : bool

If there is no open transaction, it will create one and end it after the DDL

Parameters
$link : mixed
$sql : string
Return values
bool

getOperator()

Indicates the operator for the database engine.

public getOperator(string $operator) : string
Parameters
$operator : string
Return values
string

inTransaction()

Indicates if the connection has an open transaction

public abstract inTransaction(mixed $link) : mixed
Parameters
$link : mixed
Return values
mixed

listTables()

List the existing tables in the connection

public abstract listTables(mixed $link) : mixed
Parameters
$link : mixed
Return values
mixed

rollback()

Rolls back operations done in the connection since beginTransaction

public abstract rollback(mixed $link) : mixed
Parameters
$link : mixed
Return values
mixed

select()

Runs a database statement on the connection

public abstract select(mixed $link, string $sql) : array<string|int, mixed>
Parameters
$link : mixed
$sql : string
Return values
array<string|int, mixed>

updateSequence()

public updateSequence(mixed $link, string $tableName, array<string|int, mixed> $fields) : mixed
Parameters
$link : mixed
$tableName : string
$fields : array<string|int, mixed>
Return values
mixed

version()

Database engine information

public abstract version(mixed $link) : string
Parameters
$link : mixed
Return values
string

Search results