provides the MySQL-specific implementation of the AbstractTable interface
More...
|
| string | getColumnSqlName (string col) |
| | returns the column name for use in SQL strings; subclasses can return a special string in case the column name is a reserved word
|
| |
|
list | getColumnSqlNames (softlist cols) |
| | returns a list of column names for use in SQL strings; subclasses can process the argument list in case a column name is a reserved word
|
| |
|
hash< auto > | getExpressionMap () |
| | Returns the expression map for MySQL.
|
| |
|
string | getSqlName () |
| | returns the name of the table to be used in SQL (with a possible qualifiers for schema, etc)
|
| |
|
hash< auto > | getWhereOperatorMap () |
| | returns the "where" operator map for MySQL
|
| |
|
bool | hasArrayBind () |
| | returns False because the mysql driver does not support array binds / bulk DML operations
|
| |
|
bool | hasReturningImpl () |
| | returns True if the current driver supports the "returning" clause in insert statements
|
| |
|
| static *string | getSqlValue (auto v) |
| | returns a string for use in SQL queries representing the DB-specific value of the argument
|
| |
|
| const | MysqlColumnDescOptions = ... |
| | extends SqlUtil::AbstractTable::ColumnDescOptions with MySQL-specific values
|
| |
|
const | MysqlCopMap = ... |
| | column operator specializations for MySQL
|
| |
|
const | MysqlExpressionMap = ... |
| | MySQL Expression map.
|
| |
|
const | MysqlOpMap = ... |
| | where operator specializations for MySQL
|
| |
| const | MysqlTableDescriptionHashOptions = ... |
| | extends SqlUtil::AbstractTable::TableDescriptionHashOptions
|
| |
|
const | MysqlTruncDate = ... |
| | Map SqlUtil::cop_trunc_date() constants for internal masks.
|
| |
|
const | MysqlTypeMap = ... |
| | maps mysql type names to type configurations
|
| |
|
const | QoreTypeMap = ... |
| | maps qore type names to MySQL type names
|
| |
|
|
bool | asteriskRequiresPrefix () |
| | returns True if the database requires a wildcard "*" to be prefixed with the table name when it appears with other column arguments in a select statement
|
| |
|
bool | constraintsLinkedToIndexesImpl () |
| | returns True if the database links constraints to indexes (ie dropping the constraint drops the index, etc)
|
| |
|
| copyImpl (AbstractTable old) |
| | db-specific copy actions
|
| |
|
| doSelectLimitOnlyInternImpl (reference< hash< QueryInfo > > info, reference< string > sql) |
| | processes a string for use in SQL select statements when there is a "limit" argument, but no "orderby" or "offset" arguments
|
| |
|
| doSelectOrderByWithOffsetSqlInternImpl (reference< hash< QueryInfo > > info, reference< string > sql, list< auto > coll) |
| | processes a string for use in SQL select statements when there is an "order by" and "offset" argument
|
| |
|
hash | getColumnOperatorMapImpl () |
| | returns the column operator map for this object
|
| |
|
AbstractDataProviderType | getNumericTypeImpl (string native_type, bool nullable, *hash< auto > options) |
| | returns the type for number / numeric columns for the database so that data conversions can be handled properly
|
| |
| AbstractSavepointHelper | getSavepointHelperImpl (*string savepoint) |
| | get DB-specific savepoint helper
|
| |
|
*string | getSqlValueImpl (auto v) |
| | returns a string for use in SQL queries representing the DB-specific value of the argument; returns NOTHING if the type cannot be converted to an SQL string
|
| |
| bool | isDuplicateRowErrorImpl (hash< ExceptionInfo > ex) |
| | Returns True if the exception was raised because of a duplicate row / key error.
|
| |
|
bool | supportsTablespacesImpl () |
| | returns True if the database support tablespaces
|
| |
|
bool | uniqueIndexCreatesConstraintImpl () |
| | returns True if the database automatically creates a unique constraint when a unique index is created (ex: mysql)
|
| |
|
|
static *string | getSqlValueIntern (auto v) |
| | returns a string for use in SQL queries representing the DB-specific value of the argument; returns NOTHING if the type cannot be converted to an SQL string
|
| |
provides the MySQL-specific implementation of the AbstractTable interface
◆ getColumnSqlName()
| string MysqlSqlUtil::MysqlTable::getColumnSqlName |
( |
string | col | ) |
|
returns the column name for use in SQL strings; subclasses can return a special string in case the column name is a reserved word
MySQL/MariaDB etc require column names to be enclosed in backticks instead of double quotes
◆ getSavepointHelperImpl()
| AbstractSavepointHelper MysqlSqlUtil::MysqlTable::getSavepointHelperImpl |
( |
*string | savepoint | ) |
|
|
protected |
get DB-specific savepoint helper
- Parameters
-
| savepoint | the savepoint string, if not given a unique savepoint string will be generated |
- Since
- SqlUtil 1.6
◆ getSqlValue()
| static *string MysqlSqlUtil::MysqlTable::getSqlValue |
( |
auto | v | ) |
|
|
static |
returns a string for use in SQL queries representing the DB-specific value of the argument
- Example:
string str = table.getSqlValue(date);
- Parameters
-
| v | the value to convert to an SQL value |
- Returns
- a string representing the value usable in SQL strings for the given database driver
- Exceptions
-
| VALUE-ERROR | the given value cannot be converted to an SQL string (missing rules for value) |
◆ isDuplicateRowErrorImpl()
| bool MysqlSqlUtil::MysqlTable::isDuplicateRowErrorImpl |
( |
hash< ExceptionInfo > | ex | ) |
|
|
protected |
Returns True if the exception was raised because of a duplicate row / key error.
- Since
- MysqlSqlUtil 1.4.2
◆ MysqlColumnDescOptions
| const MysqlSqlUtil::MysqlTable::MysqlColumnDescOptions = ... |
extends SqlUtil::AbstractTable::ColumnDescOptions with MySQL-specific values
the new keys are as follows:
"unsigned": only valid with numeric/integer/floating-point types
"auto_increment": only valid with integer/floating-point types
"pk": only valid with "auto_increment"
◆ MysqlTableDescriptionHashOptions
| const MysqlSqlUtil::MysqlTable::MysqlTableDescriptionHashOptions = ... |
extends SqlUtil::AbstractTable::TableDescriptionHashOptions
the following options are added:
"engine": for the DB engine behind the table (default: innodb)
"collation": for the table collation (if not set, any "collation" option set in the datasource is used for the table collation)
"table_encoding": the "character set" value for "create table" DDL statements (if not set, the DB encoding value used for the datasource will be used)