vB_dB_MYSQL_Query_Replace
extends vB_dB_Query_Replace
in package
This is the MySQL-Specific version of the Insert Query processor
Table of Contents
Constants
- BITFIELDS_KEY = '#bitfields'
- BITFIELDS_SET = '#bitset'
- BITFIELDS_UNSET = '#bitunset'
- COLUMNS_KEY = '#columns'
- CONDITION_ALL = '#all'
- CONDITIONS_KEY = '#filters'
- This class is called by the new vB_dB_Assertor database class It does the actual execution. See the vB_dB_Assertor class for more information
- DEBUG_QUERY = '#debug'
- FIELDS_KEY = '#fields'
- OPERATOR_AND = '#AND'
- OPERATOR_BEGINS = 'BEGINS'
- OPERATOR_ENDS = 'ENDS'
- OPERATOR_EQ = 'EQ'
- OPERATOR_FALSE = 'FALSE'
- OPERATOR_GT = 'GT'
- OPERATOR_GTE = 'GTE'
- OPERATOR_INCLUDES = 'INCLUDES'
- OPERATOR_ISNOTNULL = 'IS NOT NULL'
- OPERATOR_ISNULL = 'IS NULL'
- OPERATOR_KEY = 'operator'
- OPERATOR_LT = 'LT'
- OPERATOR_LTE = 'LTE'
- OPERATOR_NAND = '#NAND'
- OPERATOR_NE = 'NE'
- OPERATOR_OR = '#OR'
- PARAM_LIMIT = '#limit'
- PARAM_LIMITPAGE = '#limit_page'
- PARAM_LIMITSTART = '#limit_start'
- PRIORITY_QUERY = '#priority'
- QUERY_ALTER = 'a'
- QUERY_COUNT = 'co'
- QUERY_CREATE = 'cr'
- QUERY_DELETE = 'd'
- QUERY_DROP = 'dr'
- QUERY_INSERT = 'i'
- QUERY_INSERTIGNORE = 'ig'
- QUERY_METHOD = 'm'
- QUERY_MULTIPLEINSERT = 'mi'
- QUERY_REPLACE = 'r'
- QUERY_SELECT = 's'
- QUERY_STORED = 'st'
- QUERY_SUMMARY = 'sum'
- QUERY_TABLE = 't'
- QUERY_UPDATE = 'u'
- QUERYTYPE_KEY = '#querytype'
- SORT_ASC = 'ASC'
- SORT_DESC = 'DESC'
- TYPE_KEY = '#type'
- VALUE_ISNULL = '#NULL'
- VALUES_KEY = '#values'
Methods
- __construct() : mixed
- __serialize() : array<string|int, mixed>
- __sleep() : array<string|int, mixed>
- __unserialize() : void
- __wakeup() : void
- debugDisplayNextQuerySql() : mixed
- Causes the SQL for the next query that is exectuted to be displayed for debugging purposes. This only works if debug mode is turned on
- execSQL() : mixed
- This function is the public interface to actually execute the SQL.
- getQuery() : mixed
- setQuery() : mixed
- This loads and validates the data- ensures we have all we need
- setTableQuery() : mixed
- This loads and validates the data for a table. There's some extra work required
Constants
BITFIELDS_KEY
public
mixed
BITFIELDS_KEY
= '#bitfields'
BITFIELDS_SET
public
mixed
BITFIELDS_SET
= '#bitset'
BITFIELDS_UNSET
public
mixed
BITFIELDS_UNSET
= '#bitunset'
COLUMNS_KEY
public
mixed
COLUMNS_KEY
= '#columns'
CONDITION_ALL
public
mixed
CONDITION_ALL
= '#all'
CONDITIONS_KEY
This class is called by the new vB_dB_Assertor database class It does the actual execution. See the vB_dB_Assertor class for more information
public
mixed
CONDITIONS_KEY
= '#filters'
$queryid can be either the id of a query from the dbqueries table, or the name of a table.
if it is the name of a table , $params MUST include self::TYPE_KEY of either update, insert, select, or delete.
$params includes a list of parameters. Here's how it gets interpreted.
If the queryid was the name of a table and type was "update", one of the params must be the primary key of the table. All the other parameters will be matched against the table field names, and appropriate fields will be updated. The return value will be false if an error is generated and true otherwise
If the queryid was the name of a table and type was "delete", one of the params must be the primary key of the table. All the other parameters will be ignored The return value will be false if an error is generated and true otherwise
If the queryid was the name of a table and type was "insert", all the parameters will be matched against the table field names, and appropriate fields will be set in the insert. The return value is the primary key of the inserted record.
If the queryid was the name of a table and type was "select", all the parameters will be matched against the table field names, and appropriate fields will be part of the "where" clause of the select. The return value will be a vB_dB_Result object The return value is the primary key of the inserted record.
If the queryid is the key of a record in the dbqueries table then each params value will be matched to the query. If there are missing parameters we will return false. If the query generates an error we return false, and otherwise we return either true, or an inserted id, or a recordset.
DEBUG_QUERY
public
mixed
DEBUG_QUERY
= '#debug'
FIELDS_KEY
public
mixed
FIELDS_KEY
= '#fields'
OPERATOR_AND
public
mixed
OPERATOR_AND
= '#AND'
OPERATOR_BEGINS
public
mixed
OPERATOR_BEGINS
= 'BEGINS'
OPERATOR_ENDS
public
mixed
OPERATOR_ENDS
= 'ENDS'
OPERATOR_EQ
public
mixed
OPERATOR_EQ
= 'EQ'
OPERATOR_FALSE
public
mixed
OPERATOR_FALSE
= 'FALSE'
OPERATOR_GT
public
mixed
OPERATOR_GT
= 'GT'
OPERATOR_GTE
public
mixed
OPERATOR_GTE
= 'GTE'
OPERATOR_INCLUDES
public
mixed
OPERATOR_INCLUDES
= 'INCLUDES'
OPERATOR_ISNOTNULL
public
mixed
OPERATOR_ISNOTNULL
= 'IS NOT NULL'
OPERATOR_ISNULL
public
mixed
OPERATOR_ISNULL
= 'IS NULL'
OPERATOR_KEY
public
mixed
OPERATOR_KEY
= 'operator'
OPERATOR_LT
public
mixed
OPERATOR_LT
= 'LT'
OPERATOR_LTE
public
mixed
OPERATOR_LTE
= 'LTE'
OPERATOR_NAND
public
mixed
OPERATOR_NAND
= '#NAND'
OPERATOR_NE
public
mixed
OPERATOR_NE
= 'NE'
OPERATOR_OR
public
mixed
OPERATOR_OR
= '#OR'
PARAM_LIMIT
public
mixed
PARAM_LIMIT
= '#limit'
PARAM_LIMITPAGE
public
mixed
PARAM_LIMITPAGE
= '#limit_page'
PARAM_LIMITSTART
public
mixed
PARAM_LIMITSTART
= '#limit_start'
PRIORITY_QUERY
public
mixed
PRIORITY_QUERY
= '#priority'
QUERY_ALTER
public
mixed
QUERY_ALTER
= 'a'
QUERY_COUNT
public
mixed
QUERY_COUNT
= 'co'
QUERY_CREATE
public
mixed
QUERY_CREATE
= 'cr'
QUERY_DELETE
public
mixed
QUERY_DELETE
= 'd'
QUERY_DROP
public
mixed
QUERY_DROP
= 'dr'
QUERY_INSERT
public
mixed
QUERY_INSERT
= 'i'
QUERY_INSERTIGNORE
public
mixed
QUERY_INSERTIGNORE
= 'ig'
QUERY_METHOD
public
mixed
QUERY_METHOD
= 'm'
QUERY_MULTIPLEINSERT
public
mixed
QUERY_MULTIPLEINSERT
= 'mi'
QUERY_REPLACE
public
mixed
QUERY_REPLACE
= 'r'
QUERY_SELECT
public
mixed
QUERY_SELECT
= 's'
QUERY_STORED
public
mixed
QUERY_STORED
= 'st'
QUERY_SUMMARY
public
mixed
QUERY_SUMMARY
= 'sum'
QUERY_TABLE
public
mixed
QUERY_TABLE
= 't'
QUERY_UPDATE
public
mixed
QUERY_UPDATE
= 'u'
QUERYTYPE_KEY
public
mixed
QUERYTYPE_KEY
= '#querytype'
SORT_ASC
public
mixed
SORT_ASC
= 'ASC'
SORT_DESC
public
mixed
SORT_DESC
= 'DESC'
TYPE_KEY
public
mixed
TYPE_KEY
= '#type'
VALUE_ISNULL
public
mixed
VALUE_ISNULL
= '#NULL'
VALUES_KEY
public
mixed
VALUES_KEY
= '#values'
Methods
__construct()
public
__construct(mixed $queryid, mixed &$db, mixed $dbSlave) : mixed
Parameters
- $queryid : mixed
- $db : mixed
- $dbSlave : mixed
__serialize()
public
__serialize() : array<string|int, mixed>
Return values
array<string|int, mixed>__sleep()
public
__sleep() : array<string|int, mixed>
Return values
array<string|int, mixed>__unserialize()
public
__unserialize(array<string|int, mixed> $serialized) : void
Parameters
- $serialized : array<string|int, mixed>
__wakeup()
public
__wakeup() : void
debugDisplayNextQuerySql()
Causes the SQL for the next query that is exectuted to be displayed for debugging purposes. This only works if debug mode is turned on
public
debugDisplayNextQuerySql() : mixed
Tags
execSQL()
This function is the public interface to actually execute the SQL.
public
abstract execSQL() : mixed
getQuery()
public
static getQuery(mixed $queryid, mixed $params, mixed &$db, mixed $dbtype, mixed $dbSlave) : mixed
Parameters
- $queryid : mixed
- $params : mixed
- $db : mixed
- $dbtype : mixed
- $dbSlave : mixed
setQuery()
This loads and validates the data- ensures we have all we need
public
abstract setQuery(mixed $params, mixed $sortorder) : mixed
Parameters
- $params : mixed
- $sortorder : mixed
setTableQuery()
This loads and validates the data for a table. There's some extra work required
public
setTableQuery(mixed $params, mixed $sortorder) : mixed
Parameters
- $params : mixed
- $sortorder : mixed