Tutorial Extension
1.0.0
SellerDeck Extensions - Tutorial Extension
|
Inherited by CDataBaseAccess, and CDataBaseSqlServer.
Public Member Functions | |
__construct ($aConnectionDetails, $sDatabaseID) | |
GetDatabaseID () | |
GetDataBases () | |
GetDBUser () | |
GetDBAuthType () | |
Expression ($sExpression) | |
QuoteValue ($vData) | |
QuoteTable ($vTableName) | |
QuoteColumn ($vData) | |
QuoteCompundColumn ($vUnquotedElement) | |
GetDB () | |
GetLastQuery () | |
SQL ($sQuery, $nReturnType=\PDO::FETCH_ASSOC) | |
Insert ($sTable, $aValues, $bAutoID=true, $sIDColumn=null) | |
Update ($sTable, $aValues, $aWhere=[[1, '', '']]) | |
Select ($sTable, $vColumns="*", $aWhere=[], $aOthers=[], $nReturnType=\PDO::FETCH_ASSOC) | |
CompileWhere ($aWhere=[], $aBoolOp=BOOP_OP_AND) | |
CompileJoinOn ($aJoinOn=[]) | |
Protected Member Functions | |
Quote ($sData, $sQuoteBegin, $sQuoteEnd) | |
Sanitize ($sData) | |
QuoteArray ($aUnquotedArray, $bValue=true) | |
QuoteUpdateArray ($aUnquotedArray) | |
QuoteValueArray ($aUnquotedArray) | |
QuoteColumnArray ($aUnquotedArray) | |
QuoteValueList ($aUnquotedArray, $sSeparator=", ") | |
QuoteColumnList ($aUnquotedArray, $sSeparator=", ") | |
BasicInsert ($sTable, $aValues) | |
CompileSelectSql ($aQuery=[]) | |
CompileWhereElement ($aValue=[]) | |
IsElementFormat ($aValue) | |
CompileLimit ($vLimit) | |
CompileJoin ($aJoins) | |
ConcatenateJoins ($aJoinDirections, $aJoinTables, $aJoinOns) | |
CompileGroupBy ($aGroupByList) | |
CompileOrderBy ($aOrderByList) | |
BoolValue ($bData) | |
Definition at line 14 of file CDataBase.php.
__construct | ( | $aConnectionDetails, | |
$sDatabaseID | |||
) |
__construct - Object constructor method
public
array | $aConnectionDetails |
Definition at line 79 of file CDataBase.php.
|
protected |
BasicInsert - Generates and runs Basic INSERT expression
protected
string | $sTable | Table name |
array | $aValues | Array of (DB Column => Value) pairs |
Definition at line 444 of file CDataBase.php.
|
protected |
BoolValue - Converts Boolean to appropriate value depending on driver
protected
bool | $bData | Boolean value |
Definition at line 917 of file CDataBase.php.
|
protected |
CompileGroupBy - Compiles GROUP BY expression
protected
array | $aGroupByList | Array of GROUP BYs |
Definition at line 880 of file CDataBase.php.
|
protected |
CompileJoin - Compiles JOIN expression
protected
array | $aJoins | Array of JOINs |
Definition at line 828 of file CDataBase.php.
CompileJoinOn | ( | $aJoinOn = [] | ) |
CompileJoinOn - Generates JOIN ... ON expression
protected
array | $aJoinOn | Array of conditions |
Definition at line 778 of file CDataBase.php.
|
protected |
CompileLimit - Compiles LIMIT expression
protected
array | string | $vLimit | Array or String of LIMIT(s) |
Definition at line 809 of file CDataBase.php.
|
protected |
CompileOrderBy - Compiles ORDER BY expression
protected
array | $aOrderByList | Array of ORDER BYs |
Definition at line 898 of file CDataBase.php.
|
protected |
CompileSelectSql - Compiles SQL expression
protected
array | $aWhere | Array of conditions |
Definition at line 630 of file CDataBase.php.
CompileWhere | ( | $aWhere = [] , |
|
$aBoolOp = BOOP_OP_AND |
|||
) |
CompileWhere - Generates WHERE expression
Used in SELECT and UPDATE
protected
array | $aWhere | Array of conditions |
Definition at line 742 of file CDataBase.php.
|
protected |
CompileWhereElement - Compiles a single WHERE element
protected
array | $aValue | Array of a single condition |
Definition at line 675 of file CDataBase.php.
|
protected |
ConcatenateJoins - Concatenates JOIN expression
protected
array | $aJoinDirections | Array of JOIN Directions |
array | $aJoinTables | Array of JOIN Tables |
array | $aJoinOns | Array of JOIN ONs |
Definition at line 863 of file CDataBase.php.
Expression | ( | $sExpression | ) |
Expression - Mark SQL Expression to act as CDataBase Expression (ie. not to be surounded by quotes)
public
string | $sExpression | SQL Expression to be marked as CDataBase expression |
Definition at line 142 of file CDataBase.php.
GetDatabaseID | ( | ) |
GetDatabaseID - Database ID
public
Definition at line 97 of file CDataBase.php.
GetDataBases | ( | ) |
GetDataBases - DataBases array
public
Definition at line 108 of file CDataBase.php.
GetDB | ( | ) |
GetDBAuthType | ( | ) |
GetDBAuthType - DataBase Authentication Type
public
Definition at line 130 of file CDataBase.php.
GetDBUser | ( | ) |
GetDBUser - DataBase User
public
Definition at line 119 of file CDataBase.php.
GetLastQuery | ( | ) |
GetLastQuery - Returns last query SQL
public
Definition at line 417 of file CDataBase.php.
Insert | ( | $sTable, | |
$aValues, | |||
$bAutoID = true , |
|||
$sIDColumn = null |
|||
) |
Insert - Generates and runs INSERT expression
public
string | $sTable | Table name |
array | $aValues | Array of (DB Column => Value) pairs |
bool | $bAutoID | Has Auto ID? |
string | $sIDColumn | ID Column |
Definition at line 467 of file CDataBase.php.
|
protected |
IsElementFormat - Checks if value is a well formatted WHERE element
protected
array | $aValue | Value |
Definition at line 718 of file CDataBase.php.
|
protected |
Quote - Surrounds string with given prefix and suffix (quote signs)
protected
string | $sData | Data to quote |
string | $sQuoteBegin | Begin quote sign |
string | $sQuoteBegin | End quote sign |
Definition at line 156 of file CDataBase.php.
|
protected |
QuoteArray - Quotes array elements
protected
array | $aUnquotedArray | Array to quote |
bool | $bValue |
Definition at line 307 of file CDataBase.php.
QuoteColumn | ( | $vData | ) |
QuoteColumn - Quotes DB Column string
public
string | array | $vData | Data to quote |
Definition at line 244 of file CDataBase.php.
|
protected |
QuoteColumnArray - Quotes array elements, with DB Column quotes
protected
array | $aUnquotedArray | Array to quote |
Definition at line 362 of file CDataBase.php.
|
protected |
QuoteColumnList - Generates string of quoted DB Columns used in INSERT expressions
protected
array | $aUnquotedArray | Array to quote |
string | $sSeparator | Separator |
Definition at line 389 of file CDataBase.php.
QuoteCompundColumn | ( | $vUnquotedElement | ) |
QuoteCompundColumn - Quotes DB Column string or array
public
string | array | $vUnquotedElement | Data to quote |
Definition at line 282 of file CDataBase.php.
QuoteTable | ( | $vTableName | ) |
QuoteTable - Quotes Table name
public
string | array | $vTableName | Table name |
Definition at line 220 of file CDataBase.php.
|
protected |
QuoteUpdateArray - Generates array of quoted parameters used in UPDATE expressions
protected
array | $aUnquotedArray | Array to quote |
Definition at line 331 of file CDataBase.php.
QuoteValue | ( | $vData | ) |
QuoteValue - Quotes Value string
public
mixed | $vData | Data to quote |
Definition at line 180 of file CDataBase.php.
|
protected |
QuoteValueArray - Quotes array elements, with Value quotes
protected
array | $aUnquotedArray | Array to quote |
Definition at line 350 of file CDataBase.php.
|
protected |
QuoteValueList - Generates string of quoted Values used in INSERT expressions
protected
array | $aUnquotedArray | Array to quote |
string | $sSeparator | Separator |
Definition at line 375 of file CDataBase.php.
|
protected |
Sanitize - Sanitizes string
protected
string | $sData | Data to sanitize |
Definition at line 168 of file CDataBase.php.
Select | ( | $sTable, | |
$vColumns = "*" , |
|||
$aWhere = [] , |
|||
$aOthers = [] , |
|||
$nReturnType = \PDO::FETCH_ASSOC |
|||
) |
Select - Generates and runs SELECT expression
public
string | $sTable | Table name |
string | array | $vColumns | Columns to select |
array | $aWhere | Array of conditions |
array | $aOthers | Other parameters |
int | $nReturnType | Return Type (associative array by default) |
Definition at line 594 of file CDataBase.php.
SQL | ( | $sQuery, | |
$nReturnType = \PDO::FETCH_ASSOC |
|||
) |
SQL query
public
string | $sQuery | Table name |
int | $nReturnType | Return Type (associative array by default) |
Definition at line 430 of file CDataBase.php.
Update | ( | $sTable, | |
$aValues, | |||
$aWhere = [[1 , |
|||
'' | , | ||
'']] | |||
) |
Update - Generates and runs UPDATE expression
public
string | $sTable | Table name |
array | $aValues | Array of (DB Column => Value) pairs |
array | $aWhere | Array of conditions |
Definition at line 571 of file CDataBase.php.