MysqlSqlUtil.qm.dox.h
// -*- mode: c++; indent-tabs-mode: nil -*-
// @file MysqlSqlUtil.qm Qore user module for working with MySQL SQL data
/* MysqlSqlUtil.qm Copyright 2013 - 2017 Qore Technologies, s.r.o.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
*/
// minimum required Qore version
// requires the SqlUtil module
// don't use "$" signs for variables and class members, assume local variable scope
// require type definitions everywhere
// enable all warnings
namespace MysqlSqlUtil {
MysqlTable get_table(AbstractDatasource nds, string nname, *hash opts);
MysqlDatabase get_database(AbstractDatasource nds, *hash opts);
parse_schema_name(string nname, reference<*string> schema, reference<string> name);
class MysqlIndex : public SqlUtil::AbstractIndex {
public:
public :
string type;
public:
constructor(string n_name, bool n_unique, hash n_cols, string n_type = "BTREE") ;
string getCreateSql(string table_name, *hash opt);
private:
bool equalImpl(AbstractIndex ix);
public:
string getRenameSql(string table_name, string new_name);
string getDropSql(string table_name);
};
class MysqlForeignConstraint : public SqlUtil::AbstractForeignConstraint {
public:
constructor(string n, Columns c, ForeignConstraintTarget t) ;
string getCreateSql(string table_name, *hash opt);
softlist getRenameSql(string table_name, string new_name);
string getCreateSql(string name, string table_name, *hash opt);
string getAddSql(string name, string table_name, *hash opt);
string getDropSql(string table_name);
};
class MysqlColumn : public SqlUtil::AbstractColumn {
public:
public :
int byte_size;
public:
constructor(string n, string nt, *string qt, int sz, bool nul, *string dv, *string cm, softint bs) ;
softlist getAddColumnSql(AbstractTable t);
string getCreateSql(AbstractTable t);
softlist getModifySqlImpl(AbstractTable t, AbstractColumn col, *hash opt);
string getRenameSql(AbstractTable t, string new_name);
private:
bool equalImpl(AbstractColumn c);
public:
};
class MysqlNumericColumn : public MysqlColumn,public SqlUtil::NumericColumnInfo {
public:
public :
bool unsigned;
bool auto_increment;
// auto-incrememnt columns must be either "unique" or "primary key" in mysql
bool pk = False;
public:
constructor(string n, string nt, *string qt, int sz, bool nul, *string dv, *string cm, softint bs, softint n_scale, bool n_unsigned = False, bool n_auto_increment = False, bool n_pk = False) ;
string getNativeTypeString();
private:
bool equalImpl(AbstractColumn c);
public:
};
class MysqlUniqueConstraintCommon : public SqlUtil::AbstractUniqueConstraint {
public:
constructor();
bool setIndexBase(string ix);
clearIndex();
abstract AbstractIterator keyIterator();
getIndexSql(reference<string> sql, string name, *hash opts);
};
class MysqlUniqueConstraint : public SqlUtil::AbstractUniqueConstraint,public MysqlUniqueConstraintCommon {
public:
constructor(string n, hash n_cols) ;
MysqlColumn memberGate(string k);
string getCreateSql(string table_name, *hash opts);
list getRenameSql(string table_name, string new_name);
string getCreateSql(string name, string table_name, *hash opts);
string getDropSql(string table_name);
};
class MysqlPrimaryKey : public SqlUtil::AbstractPrimaryKey,public MysqlUniqueConstraintCommon {
public:
constructor();
constructor(*hash c) ;
MysqlColumn memberGate(string k);
string getCreateSql(string table_name, *hash opts);
softlist getRenameSql(string table_name, string new_name);
string getDropSql(string table_name);
bool supportsName();
};
class MysqlTrigger : public SqlUtil::AbstractTrigger {
public:
constructor(string n, string n_src) ;
softlist getCreateSql(string table_name, *hash opt);
softlist getDropSql(string table_name);
private:
bool equalImpl(AbstractFunctionBase t);
public:
softlist getRenameSql(string table_name, string new_name);
};
class MysqlFunction : public SqlUtil::AbstractFunction {
public:
constructor(string n, string n_src) ;
softlist getCreateSql(*hash opt);
string getDropSql(*hash opt);
private:
bool equalImpl(AbstractFunctionBase t);
public:
softlist getRenameSql(string new_name, *hash opt);
};
class MysqlSequence : public SqlUtil::AbstractSequence {
public:
private :
string table_name;
public:
constructor(string n_table_name, string n_name, number n_start = 1, number n_increment = 1, *softnumber n_end) ;
string getCreateSql(*hash opt);
softlist getRenameSql(string new_name, *hash opt);
string getDropSql(*hash opt);
};
class MysqlView : public SqlUtil::AbstractView {
public:
public :
*string tablecatalog;
*string checkoption;
*string definer;
*string securitytype;
public:
constructor(string n_name, string n_src, *string n_tablecatalog,
*string n_schema,
*string n_checkoption, *string n_definer,
*string n_securitytype, bool n_updatable)
;
string getCreateSql(*hash opt);
softlist getRenameSql(string new_name, *hash opt);
};
class MysqlDatabase : public SqlUtil::AbstractDatabase {
public:
public :
const MysqlOptions = (
"sequence_table": Type::String,
"sequence_function": Type::String,
);
const MysqlSchemaDescriptionOptions = AbstractDatabase::SchemaDescriptionOptions + MysqlOptions;
const MysqlDatabaseOptions = AbstractDatabase::DatabaseOptions + MysqlOptions;
const MysqlSequenceTable = (
"columns": (
"name": (
"qore_type": SqlUtil::VARCHAR,
"size": 40,
"notnull": True,
),
"id": (
"qore_type": Type::Number,
"size": 14,
"notnull": True,
),
),
);
const MyusqlCreationOptions = AbstractDatabase::CreationOptions;
const MysqlSequenceFunction = "%s(seq_name varchar(40)) returns decimal(14)
begin
update %s set id = last_insert_id(id + 1) where name = seq_name;
return last_insert_id();
end";
const MysqlComputeStatisticsOptions = ComputeStatisticsOptions + (
"no-binlog" : Type::Boolean,
);
const MysqlReclaimSpaceOptions = ReclaimSpaceOptions + (
"no-binlog" : Type::Boolean,
);
const MysqlReservedWords = (
"accessible" : True,
"add" : True,
"all" : True,
"alter" : True,
"analyze" : True,
"and" : True,
"as" : True,
"asc" : True,
"asensitive" : True,
"before" : True,
"between" : True,
"bigint" : True,
"binary" : True,
"blob" : True,
"both" : True,
"by" : True,
"call" : True,
"cascade" : True,
"case" : True,
"change" : True,
"char" : True,
"character" : True,
"check" : True,
"collate" : True,
"column" : True,
"condition" : True,
"constraint" : True,
"continue" : True,
"convert" : True,
"create" : True,
"cross" : True,
"current_date" : True,
"current_time" : True,
"current_timestamp" : True,
"current_user" : True,
"cursor" : True,
"database" : True,
"databases" : True,
"day_hour" : True,
"day_microsecond" : True,
"day_minute" : True,
"day_second" : True,
"dec" : True,
"decimal" : True,
"declare" : True,
"default" : True,
"delayed" : True,
"delete" : True,
"desc" : True,
"describe" : True,
"deterministic" : True,
"distinct" : True,
"distinctrow" : True,
"div" : True,
"double" : True,
"drop" : True,
"dual" : True,
"each" : True,
"else" : True,
"elseif" : True,
"enclosed" : True,
"escaped" : True,
"exists" : True,
"exit" : True,
"explain" : True,
"false" : True,
"fetch" : True,
"float" : True,
"float4" : True,
"float8" : True,
"for" : True,
"force" : True,
"foreign" : True,
"from" : True,
"fulltext" : True,
"get" : True,
"grant" : True,
"group" : True,
"having" : True,
"high_priority" : True,
"hour_microsecond" : True,
"hour_minute" : True,
"hour_second" : True,
"if" : True,
"ignore" : True,
"in" : True,
"index" : True,
"infile" : True,
"inner" : True,
"inout" : True,
"insensitive" : True,
"insert" : True,
"int" : True,
"int1" : True,
"int2" : True,
"int3" : True,
"int4" : True,
"int8" : True,
"integer" : True,
"interval" : True,
"into" : True,
"io_after_gtids" : True,
"io_before_gtids" : True,
"is" : True,
"iterate" : True,
"join" : True,
"key" : True,
"keys" : True,
"kill" : True,
"leading" : True,
"leave" : True,
"left" : True,
"like" : True,
"limit" : True,
"linear" : True,
"lines" : True,
"load" : True,
"localtime" : True,
"localtimestamp" : True,
"lock" : True,
"long" : True,
"longblob" : True,
"longtext" : True,
"loop" : True,
"low_priority" : True,
"master_bind" : True,
"master_ssl_verify_server_cert" : True,
"match" : True,
"maxvalue" : True,
"mediumblob" : True,
"mediumint" : True,
"mediumtext" : True,
"middleint" : True,
"minute_microsecond" : True,
"minute_second" : True,
"mod" : True,
"modifies" : True,
"natural" : True,
"not" : True,
"no_write_to_binlog" : True,
"null" : True,
"numeric" : True,
"on" : True,
"optimize" : True,
"option" : True,
"optionally" : True,
"or" : True,
"order" : True,
"out" : True,
"outer" : True,
"outfile" : True,
"partition" : True,
"precision" : True,
"primary" : True,
"procedure" : True,
"purge" : True,
"range" : True,
"read" : True,
"reads" : True,
"read_write" : True,
"real" : True,
"references" : True,
"regexp" : True,
"release" : True,
"rename" : True,
"repeat" : True,
"replace" : True,
"require" : True,
"resignal" : True,
"restrict" : True,
"return" : True,
"revoke" : True,
"right" : True,
"rlike" : True,
"schema" : True,
"schemas" : True,
"second_microsecond" : True,
"select" : True,
"sensitive" : True,
"separator" : True,
"set" : True,
"show" : True,
"signal" : True,
"smallint" : True,
"spatial" : True,
"specific" : True,
"sql" : True,
"sqlexception" : True,
"sqlstate" : True,
"sqlwarning" : True,
"sql_big_result" : True,
"sql_calc_found_rows" : True,
"sql_small_result" : True,
"ssl" : True,
"starting" : True,
"straight_join" : True,
"table" : True,
"terminated" : True,
"then" : True,
"tinyblob" : True,
"tinyint" : True,
"tinytext" : True,
"to" : True,
"trailing" : True,
"trigger" : True,
"true" : True,
"undo" : True,
"union" : True,
"unique" : True,
"unlock" : True,
"unsigned" : True,
"update" : True,
"usage" : True,
"use" : True,
"using" : True,
"utc_date" : True,
"utc_time" : True,
"utc_timestamp" : True,
"values" : True,
"varbinary" : True,
"varchar" : True,
"varcharacter" : True,
"varying" : True,
"when" : True,
"where" : True,
"while" : True,
"with" : True,
"write" : True,
"xor" : True,
"year_month" : True,
"zerofill" : True,
);
public:
private :
string schema;
Datasource seqds;
string sequence_table = "sqlutil_sequences";
string sequence_function = "sqlutil_nextval";
public:
constructor(AbstractDatasource nds, *hash opts) ;
private:
list featuresImpl();
public:
string getSchemaName();
private:
AbstractSequence makeSequenceImpl(string name, number start = 1, number increment = 1, *softnumber end, *hash opts);
public:
private:
*AbstractSequence getSequenceImpl(string name);
public:
private:
*AbstractView getViewImpl(string name);
public:
private:
MysqlFunction makeFunctionImpl(string name, string src, *hash opts);
public:
private:
MysqlFunction makeProcedureImpl(string name, string src, *hash opts);
public:
private:
*AbstractFunction getFunctionImpl(string name);
public:
private:
static string makeParameter(hash row);
public:
private:
AbstractFunction getProcedureImpl(string name);
public:
private:
list getDropSchemaSqlImpl(hash schema_hash, *hash opt);
public:
private:
list getAlignSqlImpl(hash schema_hash, *hash opt);
public:
private:
list listTablesImpl();
public:
private:
list listFunctionsImpl();
public:
private:
list listProceduresImpl();
public:
private:
list listSequencesImpl();
public:
private:
list listViewsImpl();
public:
private:
string getCreateSqlImpl(list l);
public:
static string getCreateSql(list l);
private:
hash getDatabaseOptions();
public:
private:
hash getSchemaDescriptionOptions();
public:
private:
hash getComputeStatisticsOptions();
public:
private:
hash getReclaimSpaceOptions();
public:
private:
softint getNextSequenceValueImpl(string name);
public:
private:
softint getCurrentSequenceValueImpl(string name);
public:
private:
bool supportsSequencesImpl();
public:
private:
bool supportsTypesImpl();
public:
private:
bool supportsPackagesImpl();
public:
private:
bool rebuildIndexImpl(string name, *hash options);
public:
private:
computeStatisticsImpl(*hash options);
public:
private:
reclaimSpaceImpl(*hash options);
public:
};
class MysqlTable : public SqlUtil::AbstractTable {
public:
public :
const MysqlTypeMap = (
"decimal": ("qore": Type::Number, "size": SZ_NUM,),
"tinyint": ("qore": Type::Int, "ai": True,),
"smallint": ("qore": Type::Int, "ai": True,),
"mediumint": ("qore": Type::Int, "ai": True,),
"int": ("qore": Type::Int, "ai": True,),
"bigint": ("qore": Type::Int, "ai": True,),
"float": ("qore": Type::Float, "ai": True,),
"double": ("qore": Type::Float, "ai": True,),
"date": ("qore": Type::Date,),
"datetime": ("qore": Type::Date,),
"timestamp": ("qore": Type::Date, "size": SZ_OPT, "size_range": (0, 6),"default_size": 6,),
"time": ("qore": Type::Date, "size": SZ_OPT, "size_range": (0, 6),"default_size": 6,),
"year": ("qore": Type::Int,),
"char": ("qore": Type::String, "size": SZ_OPT, "size_range": (0, 255)),
"varchar": ("qore": Type::String, "size": SZ_MAND, "size_range": (0, 65535)),
"binary": ("qore": Type::Binary, "size": SZ_OPT, "size_range": (0, 255)),
"varbinary": ("qore": Type::Binary, "size": SZ_MAND, "size_range": (0, 65535)),
"tinytext": ("qore": Type::String,),
"text": ("qore": Type::String,),
"mediumtext": ("qore": Type::String,),
"longtext": ("qore": Type::String,),
"tinyblob": ("qore": Type::Binary,),
"blob": ("qore": Type::Binary,),
"mediumblob": ("qore": Type::Binary,),
"longblob": ("qore": Type::Binary,),
"bit": ("qore": Type::Int,),
);
const QoreTypeMap = (
"integer": "bigint",
"float": "double",
"number": "decimal",
"string": "varchar",
"date": "datetime",
"binary": "varbinary",
"bool": "tinyint",
SqlUtil::CHAR: "char",
SqlUtil::CLOB: "mediumtext",
SqlUtil::BLOB: "mediumblob",
);
const MysqlTableDescriptionHashOptions = AbstractTable::TableDescriptionHashOptions + (
"engine": Type::String,
);
const MysqlColumnDescOptions = AbstractTable::ColumnDescOptions + (
"unsigned": Type::Boolean,
"auto_increment": Type::Boolean,
"pk": Type::Boolean,
);
const MysqlIndexOptions = AbstractTable::IndexOptions;
const MysqlConstraintOptions = AbstractTable::ConstraintOptions + MysqlIndexOptions + (
"index": Type::String,
);
const MysqlTableCreationOptions = AbstractTable::TableCreationOptions + MysqlConstraintOptions;
const MysqlAlignTableOptions = AbstractTable::AlignTableOptions + MysqlTableCreationOptions;
const MysqlCopMap = (
COP_CAST: (
"code": string (string cve, list args) {
string name = QoreTypeMap{args[0]} ?? args[0];
if (name == "varchar") name = "char"; // NOTE: due to current MariaSQL issue ("ERROR 1064 (42000)")
hash desc = MysqlTypeMap{name};
string sql = sprintf ("cast(%s as %s", cve, name);
switch (name);
sql += ")";
return sql;
},
),
COP_PREPEND: (
"arg": Type::String,
"sqlvalue": True,
"code": string (string cve, string arg) {
return sprintf("concat(%s,%s)", arg, cve);
},
),
COP_APPEND: (
"arg": Type::String,
"sqlvalue": True,
"code": string (string cve, string arg) {
return sprintf("concat(%s,%s)", cve, arg);
},
),
COP_YEAR: (
"code": string (string arg1, auto arg) {
return sprintf("date_format(%s, '%%Y')", arg1);
}
),
COP_YEAR_MONTH: (
"code": string (string arg1, auto arg) {
return sprintf("date_format(%s, '%%Y-%%m')", arg1);
}
),
COP_YEAR_DAY: (
"code": string (string arg1, auto arg) {
return sprintf("date_format(%s, '%%Y-%%m-%%e')", arg1);
}
),
COP_YEAR_HOUR: (
"code": string (string arg1, auto arg) {
return sprintf("date_format(%s, '%%Y-%%m-%%e %%k')", arg1);
}
),
COP_TRUNC_DATE: (
"code": string sub(string arg1, auto arg) {
if (!MysqlTruncDate.hasKey(arg));
return sprintf("cast(date_format(%s, %s) as datetime)", arg1, MysqlTruncDate{arg});
}
)
);
const MysqlTruncDate = (
DT_YEAR : "'%Y-01-01 00:00:00'",
DT_MONTH : "'%Y-%m-01 00:00:00'",
DT_DAY : "'%Y-%m-%d 00:00:00'",
DT_HOUR : "'%Y-%m-%d %H:00:00'",
DT_MINUTE : "'%Y-%m-%d %H:%i:00'",
DT_SECOND : "'%Y-%m-%d %H:%i:%s'",
);
public:
private :
string schema;
string engine = "innodb";
public:
constructor(AbstractDatasource nds, string nname, *hash opts) ;
string getSqlName();
private:
hash getTableCreationOptions();
public:
private:
hash getTableDescriptionHashOptions();
public:
private:
hash getColumnDescOptions();
public:
private:
hash getIndexOptions();
public:
private:
hash getConstraintOptions();
public:
private:
hash getAlignTableOptions();
public:
private:
hash getColumnOperatorMapImpl();
public:
private:
bool checkExistenceImpl();
public:
private:
Columns describeImpl();
public:
private:
*string getCreatePrimaryKeySqlUnlocked(*hash opt, bool cache = True);
public:
private:
MysqlPrimaryKey getPrimaryKeyImpl();
public:
private:
Indexes getIndexesImpl();
public:
private:
ForeignConstraints getForeignConstraintsImpl(*hash opts);
public:
private:
Constraints getConstraintsImpl();
public:
private:
Triggers getTriggersImpl();
public:
string getCreateTableSqlImpl(*hash opt);
bool hasArrayBind();
private:
*list getCreateMiscSqlImpl(*hash opt, bool cache);
public:
private:
*list getAlignSqlImpl(AbstractTable table, *hash opt);
public:
private:
string getCreateSqlImpl(list l);
public:
private:
string getRenameSqlImpl(string new_name);
public:
private:
AbstractColumn addColumnImpl(string cname, hash opt, bool nullable = True);
public:
private:
setPrimaryKeyUnlocked(AbstractPrimaryKey pk);
public:
private:
addColumnToTableUnlocked(AbstractColumn c);
public:
private:
AbstractPrimaryKey addPrimaryKeyImpl(string cname, hash ch, *hash opt);
public:
private:
AbstractIndex addIndexImpl(string iname, bool enabled, hash ch, *hash opt);
public:
private:
AbstractForeignConstraint addForeignConstraintImpl(string cname, hash ch, string table, hash tch, *hash opt);
public:
private:
AbstractCheckConstraint addCheckConstraintImpl(string cname, string src, *hash opt);
public:
private:
AbstractUniqueConstraint addUniqueConstraintImpl(string cname, hash ch, *hash opt);
public:
private:
AbstractTrigger addTriggerImpl(string tname, string src, *hash opt);
public:
private:
bool tryInsertImpl(string sql, hash row);
public:
private:
hash getQoreTypeMapImpl();
public:
private:
hash getTypeMapImpl();
public:
private:
*string getSqlValueImpl(auto v);
public:
private:
static *string getSqlValueIntern(auto v);
public:
string getColumnSqlName(string col);
list getColumnSqlNames(softlist cols);
static *string getSqlValue(auto v);
private:
bool emptyImpl();
public:
private:
preSetupTableImpl(reference<hash> desc, *hash opt);
public:
private:
setupTableImpl(hash desc, *hash opt);
public:
private:
bool constraintsLinkedToIndexesImpl();
public:
private:
bool uniqueIndexCreatesConstraintImpl();
public:
private:
bool supportsTablespacesImpl();
public:
private:
doSelectLimitOnlyUnlockedImpl(reference<string> sql, reference<list> args, *hash qh);
public:
private:
doSelectOrderByWithOffsetSqlUnlockedImpl(reference<string> sql, reference<list> args, *hash qh, *hash jch, *hash ch, *hash psch, list coll);
public:
private:
bool asteriskRequiresPrefix();
public:
private:
*hash doReturningImpl(hash opt, reference<string> sql, list args);
public:
private:
list getGroupOrderByListUnlocked(string key, hash qh, *hash jch, *hash ch, *hash psch, list coll);
public:
bool hasReturningImpl();
private:
copyImpl(AbstractTable old);
public:
};
};
Date
const Date
MysqlSqlUtil::MysqlColumn::byte_size
int byte_size
byte size of the column
Definition: MysqlSqlUtil.qm.dox.h:219
String
const String
MysqlSqlUtil::MysqlForeignConstraint
represents a MySQL-specific foreign constraint
Definition: MysqlSqlUtil.qm.dox.h:189
sprintf
string sprintf(string fmt,...)
SqlUtil::AbstractTable
SqlUtil::VARCHAR
const VARCHAR
MysqlSqlUtil
the MysqlSqlUtil namespace contains all the objects in the MysqlSqlUtil module
Definition: MysqlSqlUtil.qm.dox.h:143
MysqlSqlUtil::MysqlDatabase
provides the MySQL-specific implementation of the AbstractDatabase interface
Definition: MysqlSqlUtil.qm.dox.h:538
MysqlSqlUtil::MysqlIndex::equalImpl
bool equalImpl(AbstractIndex ix)
returns True if the argument is equal to the current index, False if not
SqlUtil::AbstractIndex
MysqlSqlUtil::get_table
MysqlTable get_table(AbstractDatasource nds, string nname, *hash opts)
returns a MysqlTable object corresponding to the arguments
MysqlSqlUtil::MysqlView
represents a MySQL view
Definition: MysqlSqlUtil.qm.dox.h:502
MysqlSqlUtil::get_database
MysqlDatabase get_database(AbstractDatasource nds, *hash opts)
returns a MysqlDatabase object corresponding to the arguments
MysqlSqlUtil::MysqlView::securitytype
*string securitytype
security type value
Definition: MysqlSqlUtil.qm.dox.h:513
SqlUtil::NumericColumnInfo
True
const True
SZ_MAND
const SZ_MAND
SqlUtil::CHAR
const CHAR
SqlUtil::AbstractSequence
number
number number(softnumber n)
COP_YEAR_HOUR
const COP_YEAR_HOUR
SqlUtil::AbstractForeignConstraint
False
const False
MysqlSqlUtil::MysqlView::checkoption
*string checkoption
checkoption clause
Definition: MysqlSqlUtil.qm.dox.h:509
list
list list(...)
Float
const Float
DT_DAY
const DT_DAY
Boolean
const Boolean
SZ_NUM
const SZ_NUM
MysqlSqlUtil::MysqlIndex::getDropSql
string getDropSql(string table_name)
returns a string that can be used to drop the index from the table
Binary
const Binary
MysqlSqlUtil::MysqlFunction
represents a MySQL-specific function
Definition: MysqlSqlUtil.qm.dox.h:439
MysqlSqlUtil::MysqlTable
provides the MySQL-specific implementation of the AbstractTable interface
Definition: MysqlSqlUtil.qm.dox.h:1045
MysqlSqlUtil::MysqlPrimaryKey
represents a MySQL-specific primary key constraint
Definition: MysqlSqlUtil.qm.dox.h:366
COP_YEAR_MONTH
const COP_YEAR_MONTH
MysqlSqlUtil::MysqlTrigger
represents a MySQL-specific trigger
Definition: MysqlSqlUtil.qm.dox.h:411
SqlUtil::BLOB
const BLOB
SqlUtil::AbstractIndex::name
string name
SqlUtil::CLOB
const CLOB
MysqlSqlUtil::MysqlView::definer
*string definer
dafiner clause
Definition: MysqlSqlUtil.qm.dox.h:511
SqlUtil::AbstractFunction
COP_PREPEND
const COP_PREPEND
COP_TRUNC_DATE
const COP_TRUNC_DATE
SqlUtil::AbstractView
MysqlSqlUtil::MysqlDatabase::seqds
Datasource seqds
separate datasource dedicated for extern sequence implementation with autonomous transactions ...
Definition: MysqlSqlUtil.qm.dox.h:831
Int
const Int
COP_YEAR
const COP_YEAR
string
string string(softstring str, *string enc)
SqlUtil::AbstractTrigger
SqlUtil::AbstractColumn
MysqlSqlUtil::MysqlSequence
class for MySQL sequences based on a sequence table and autonomous transactions
Definition: MysqlSqlUtil.qm.dox.h:471
COP_CAST
const COP_CAST
DT_MINUTE
const DT_MINUTE
DT_HOUR
const DT_HOUR
MysqlSqlUtil::MysqlNumericColumn
represents a MySQL-specific numeric column
Definition: MysqlSqlUtil.qm.dox.h:281
MysqlSqlUtil::MysqlColumn
represents a MySQL-specific column
Definition: MysqlSqlUtil.qm.dox.h:214
COP_YEAR_DAY
const COP_YEAR_DAY
MysqlSqlUtil::MysqlView::tablecatalog
*string tablecatalog
table catalog value
Definition: MysqlSqlUtil.qm.dox.h:507
DT_MONTH
const DT_MONTH
MysqlSqlUtil::MysqlIndex
represents a MySQL-specific index
Definition: MysqlSqlUtil.qm.dox.h:156
hash
hash hash(object obj)
SZ_OPT
const SZ_OPT
MysqlSqlUtil::MysqlIndex::getCreateSql
string getCreateSql(string table_name, *hash opt)
returns a string that can be used to create the index in the database
MysqlSqlUtil::MysqlIndex::getRenameSql
string getRenameSql(string table_name, string new_name)
returns a string that can be used to rename the index in the database; hwoever mysql does not support...
SqlUtil::AbstractDatabase
DT_YEAR
const DT_YEAR
SqlUtil::AbstractPrimaryKey
Number
const Number
MysqlSqlUtil::MysqlIndex::constructor
constructor(string n_name, bool n_unique, hash n_cols, string n_type="BTREE")
creates the object from the arguments
SqlUtil::AbstractUniqueConstraint
DT_SECOND
const DT_SECOND
COP_APPEND
const COP_APPEND