FacturaScripts

DataBaseQueries

Interface to manage the SQL statements needed by the database

Tags
author

Carlos García Gómez [email protected]

author

Jose Antonio Cuello Principal [email protected]

Table of Contents

sql2Int()  : string
Statement needed to convert a column to integer
sqlAddConstraint()  : string
SQL statement to add a constraint to a given table
sqlAlterAddColumn()  : string
SQL statement to add a given table column
sqlAlterColumnDefault()  : string
SQL statement to alter a given table column's default value
sqlAlterColumnNull()  : string
SQL statement to alter a given table column's null constraint
sqlAlterModifyColumn()  : string
SQL statement to alter a given table column's definition
sqlColumns()  : string
SQL statement to get the columns in a table
sqlConstraints()  : string
SQL statement to get the table constraints
sqlConstraintsExtended()  : string
SQL statement to get the table extended constraints
sqlCreateTable()  : string
SQL statement to create a table
sqlDropConstraint()  : string
SQL statement to delete a given table column's constraint
sqlDropTable()  : string
SQL statement to drop a given table
sqlIndexes()  : string
SQL statement to get a given table's indexes
sqlLastValue()  : string
SQL statement to get the last value of a sequence or ID
sqlTableConstraints()  : string
Generates the SQL to establish the given restrictions.

Methods

sql2Int()

Statement needed to convert a column to integer

public sql2Int(string $colName) : string
Parameters
$colName : string
Return values
string

sqlAddConstraint()

SQL statement to add a constraint to a given table

public sqlAddConstraint(string $tableName, string $constraintName, string $sql) : string
Parameters
$tableName : string
$constraintName : string
$sql : string
Return values
string

sqlAlterAddColumn()

SQL statement to add a given table column

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

sqlAlterColumnDefault()

SQL statement to alter a given table column's default value

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

sqlAlterColumnNull()

SQL statement to alter a given table column's null constraint

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

sqlAlterModifyColumn()

SQL statement to alter a given table column's definition

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

sqlColumns()

SQL statement to get the columns in a table

public sqlColumns(string $tableName) : string
Parameters
$tableName : string
Return values
string

sqlConstraints()

SQL statement to get the table constraints

public sqlConstraints(string $tableName) : string
Parameters
$tableName : string
Return values
string

sqlConstraintsExtended()

SQL statement to get the table extended constraints

public sqlConstraintsExtended(string $tableName) : string
Parameters
$tableName : string
Return values
string

sqlCreateTable()

SQL statement to create a table

public sqlCreateTable(string $tableName, array<string|int, mixed> $columns, array<string|int, mixed> $constraints) : string
Parameters
$tableName : string
$columns : array<string|int, mixed>
$constraints : array<string|int, mixed>
Return values
string

sqlDropConstraint()

SQL statement to delete a given table column's constraint

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

sqlDropTable()

SQL statement to drop a given table

public sqlDropTable(string $tableName) : string
Parameters
$tableName : string
Return values
string

sqlIndexes()

SQL statement to get a given table's indexes

public sqlIndexes(string $tableName) : string
Parameters
$tableName : string
Return values
string

sqlLastValue()

SQL statement to get the last value of a sequence or ID

public sqlLastValue() : string
Return values
string

sqlTableConstraints()

Generates the SQL to establish the given restrictions.

public sqlTableConstraints(array<string|int, mixed> $xmlCons) : string
Parameters
$xmlCons : array<string|int, mixed>
Return values
string

Search results