Qore MysqlSqlUtil Module Reference: MysqlSqlUtil::MysqlTable Class Reference

Qore MysqlSqlUtil Module Reference 1.0

- Main Page
- Related Pages
- Namespaces
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Functions Variables Groups Pages
Public Member Functions | Static Public Member Functions | Public Attributes | Static Private Member Functions | List of all members
MysqlSqlUtil::MysqlTable Class Reference

provides the MySQL-specific implementation of the AbstractTable interface More...

Inheritance diagram for MysqlSqlUtil::MysqlTable:
[legend]

## Public Member Functions
private bool | constraintsLinkedToIndexesImpl ()
| returns True if the database links constraints to indexes (ie dropping the constraint drops the index, etc)
private | copyImpl (AbstractTable old)
| db-specific copy actions
private | doSelectLimitOnlyUnlockedImpl (reference sql, reference args, *hash qh)
| processes a string for use in SQL select statements when there is a "limit" argument, but no "orderby" or "offset" arguments
private | doSelectOrderByWithOffsetSqlUnlockedImpl (reference sql, reference args, *hash qh, *hash jch, *hash ch)
| processes a string for use in SQL select statements when there is an "order by" and "offset" argument
private hash | getColumnOperatorMap ()
| returns the column operator map for this object
string | getSqlName ()
| returns the name of the table to be used in SQL (with a possible qualifiers for schema, etc)
private *string | getSqlValueImpl (any 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
private bool | supportsTablespacesImpl ()
| returns True if the database support tablespaces
private bool | uniqueIndexCreatesConstraintImpl ()
| returns True if the database automatically creates a unique constraint when a unique index is created (ex: mysql)

## Static Public Member Functions
static *string | getSqlValue (any v)
| returns a string for use in SQL queries representing the DB-specific value of the argument More...

## Public Attributes
const | MysqlColumnDescOptions
| extends SqlUtil::AbstractTable::ColumnDescOptions with MySQL-specific values More...
const | MysqlCopMap
| column operator specializations for MySQL
const | MysqlTableDescriptionHashOptions
| extends SqlUtil::AbstractTable::TableDescriptionHashOptions with `"engine"` for the DB engine behind the table (default: `innodb`)
const | MysqlTypeMap
| maps mysql type names to type configurations
const | QoreTypeMap
| maps qore type names to postgresql type names

## Static Private Member Functions
static *string | getSqlValueIntern (any 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

## Detailed Description

provides the MySQL-specific implementation of the AbstractTable interface

## Member Function Documentation

static *string MysqlSqlUtil::MysqlTable::getSqlValue | ( | any | v | ) |
| static

returns a string for use in SQL queries representing the DB-specific value of the argument

Example:
  my 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)

## Member Data Documentation

const MysqlSqlUtil::MysqlTable::MysqlColumnDescOptions

Initial value:
= AbstractTable::ColumnDescOptions + (
"unsigned": Type::Boolean,
"auto_increment": Type::Boolean,
"pk": Type::Boolean,
)

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"`