PgsqlSqlUtil.qm.dox.h
// -*- mode: c++; indent-tabs-mode: nil -*-
// @file PgsqlSqlUtil.qm Qore user module for working with PostgreSQL SQL data
/* PgsqlSqlUtil.qm Copyright (C) 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 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
// version history is included below in the docs
namespace PgsqlSqlUtil {
PgsqlTable get_table(AbstractDatasource nds, string nname, *hash opts);
PgsqlDatabase get_database(AbstractDatasource nds, *hash opts);
parse_schema_name(string nname, reference<string> schema, reference<string> name);
class PgsqlType {
public:
public :
string name;
string src;
public:
constructor(string n_name, string n_src);
list getTypeList();
list getModifySql(PgsqlType old, *hash opt);
string getCreateSql(*hash opt);
string getDropSql(*hash opt);
string getRenameSql(string new_name, *hash opt);
bool equal(PgsqlType type);
};
class PgsqlIndex : public SqlUtil::AbstractIndex {
public:
public :
*string tablespace;
public:
constructor(string n_name, bool n_unique, hash n_cols, *string n_tablespace) ;
string getCreateSql(string table_name, *hash opt);
private:
bool equalImpl(AbstractIndex ix);
public:
string getRenameSql(string table_name, string new_name);
};
class PgsqlForeignConstraint : 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);
};
class PgsqlCheckConstraint : public SqlUtil::AbstractCheckConstraint {
public:
constructor(string n, string n_src) ;
string getCreateSql(string table_name, *hash opt);
list getRenameSql(string table_name, string new_name);
string getCreateSql(string name, string table_name, *hash opt);
};
class PgsqlColumn : 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) ;
string getNativeTypeString();
list getAddColumnSql(AbstractTable t);
list getModifySqlImpl(AbstractTable t, AbstractColumn col, *hash opt);
string getRenameSql(AbstractTable t, string new_name);
private:
bool equalImpl(AbstractColumn c);
public:
};
class PgsqlNumericColumn : public PgsqlColumn,public SqlUtil::NumericColumnInfo {
public:
constructor(string n, string nt, *string qt, int sz, bool nul, *string dv, *string cm, softint bs, softint n_scale) ;
string getNativeTypeString();
};
class PgsqlUniqueConstraintCommon : public SqlUtil::AbstractUniqueConstraint {
public:
private :
*string tablespace;
public:
constructor(*string ts);
*string getTablespace();
setTablespace(*string ts);
bool setIndexBase(string ix);
clearIndex();
abstract AbstractIterator keyIterator();
getIndexSql(reference<string> sql, string name, *hash opts);
};
class PgsqlUniqueConstraint : public SqlUtil::AbstractUniqueConstraint,public PgsqlUniqueConstraintCommon {
public:
private :
bool enabled;
public:
constructor(string n, hash n_cols, bool e = True, *string ts) ;
PgsqlColumn 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);
bool isEnabled();
};
class PgsqlPrimaryKey : public SqlUtil::AbstractPrimaryKey,public PgsqlUniqueConstraintCommon {
public:
constructor();
constructor(string n, *hash c, *string ts) ;
PgsqlColumn memberGate(string k);
string getCreateSql(string table_name, *hash opts);
softlist getRenameSql(string table_name, string new_name);
};
class PgsqlSequence : public SqlUtil::AbstractSequence {
public:
constructor(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);
};
class PgsqlView : public SqlUtil::AbstractView {
public:
public :
*string viewowner;
public:
constructor(string n_name, string n_src, *string n_schemaname,
*string n_viewowner)
;
string getCreateSql(*hash opt);
softlist getRenameSql(string new_name, *hash opt);
};
class PgsqlTrigger : 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 PgsqlFunction : public SqlUtil::AbstractFunction {
public:
public :
*string args;
public:
constructor(string n, string n_src, *string a) ;
softlist getCreateSql(*hash opt);
string getDropSql(*hash opt);
private:
bool equalImpl(AbstractFunctionBase t);
public:
softlist getRenameSql(string new_name, *hash opt);
setName(string new_name);
};
class PgsqlTriggerFunction : public PgsqlFunction {
public:
public :
string trigger;
public:
constructor(string n, string n_src, string n_trigger) ;
};
class PgsqlDatabase : public SqlUtil::AbstractDatabase {
public:
public :
const PgsqlSchemaDescriptionOptions = AbstractDatabase::SchemaDescriptionOptions + (
"types": Type::Hash,
"type_map": Type::Hash,
);
const PGSQL_TempSavepoint = "qore_pgsql_tmp_savepoint";
const PgsqlReclaimSpaceOptions = ReclaimSpaceOptions + (
"full" : Type::Boolean,
"analyze" : Type::Boolean,
);
public:
constructor(AbstractDatasource nds, *hash opts) ;
private:
list featuresImpl();
public:
PgsqlType makeType(string name, string src, *hash opts);
*PgsqlType getType(string name);
private:
PgsqlSequence 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:
PgsqlFunction makeFunctionImpl(string name, string src, *hash opts);
public:
private:
PgsqlFunction makeProcedureImpl(string name, string src, *hash opts);
public:
private:
*AbstractFunction getFunctionImpl(string name);
public:
private:
AbstractFunction getProcedureImpl(string name);
public:
static *string getFunctionArgs(string err, reference<string> src);
static PgsqlFunction processFunction(hash row, bool native_case);
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:
list listMaterializedViews();
ListIterator materializedViewIterator();
list listTypes();
ListIterator typeIterator();
private:
string getCreateSqlImpl(list l);
public:
static string getCreateSql(list l);
private:
hash getSchemaDescriptionOptions();
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:
private:
auto tryExecArgsImpl(string sql, *softlist args);
public:
private:
auto tryExecRawImpl(string sql, *softlist args);
public:
static auto tryExecArgs(AbstractDatasource ds, string sql, *softlist args);
static auto tryExecRaw(AbstractDatasource ds, string sql);
};
class PgsqlTable : public SqlUtil::AbstractTable {
public:
public :
const PgsqlTypeMap = (
"abstime": ("qore": Type::Date,),
"bigint": ("qore": Type::Int,),
"bigserial": ("qore": Type::Int,),
"bit": ("qore": Type::Binary, "size": SZ_OPT,),
"bit varying": ("qore": Type::Binary, "size": SZ_OPT,),
"bool": ("qore": Type::Boolean,),
"boolean": ("qore": Type::Boolean,),
"bytea": ("qore": Type::Binary,),
"char": ("qore": Type::String, "size": SZ_OPT,),
"character": ("qore": Type::String, "size": SZ_OPT,),
"character varying": ("qore": Type::String, "size": SZ_OPT,),
"cidr": ("qore": Type::String,),
"date": ("qore": Type::Date,),
"decimal": ("qore": Type::Number, "size": SZ_NUM,),
"double precision": ("qore": Type::Float,),
"float": ("qore": Type::Float,),
"inet": ("qore": Type::String,),
"int": ("qore": Type::Int,),
"integer": ("qore": Type::Int,),
"interval": ("qore": Type::Date, "size": SZ_OPT, "size_range": (0, 6), "default_size": 6,),
"macaddr": ("qore": Type::String,),
"money": ("qore": Type::Number,),
"numeric": ("qore": Type::Number, "size": SZ_NUM,),
"oid": ("qore": Type::Int,),
"real": ("qore": Type::Float,),
"reltime": ("qore": Type::Date,),
"serial": ("qore": Type::Int,),
"smallint": ("qore": Type::Int,),
"smallserial": ("qore": Type::Int,),
"text": ("qore": Type::String,),
"time": ("qore": Type::Date, "size": SZ_OPT, "size_range": (0, 6), "default_size": 6,),
"time with time zone": ("qore": Type::Date, "size": SZ_OPT, "size_range": (0, 6), "default_size": 6,),
"time without time zone": ("qore": Type::Date, "size": SZ_OPT, "size_range": (0, 6), "default_size": 6,),
"timetz": ("qore": Type::Date, "size": SZ_OPT, "size_range": (0, 6), "default_size": 6,),
"timestamp": ("qore": Type::Date, "size": SZ_OPT, "size_range": (0, 6), "default_size": 6,),
"timestamp with time zone": ("qore": Type::Date, "size": SZ_OPT, "size_range": (0, 6), "default_size": 6,),
"timestamp without time zone": ("qore": Type::Date, "size": SZ_OPT, "size_range": (0, 6), "default_size": 6,),
"timestamptz": ("qore": Type::Date, "size": SZ_OPT, "size_range": (0, 6), "default_size": 6,),
"varbit": ("qore": Type::Binary, "size": SZ_OPT,),
"varchar": ("qore": Type::String, "size": SZ_OPT,),
);
const PgsqlNameMap = (
"bit varying": "varbit",
"character": "char",
"character varying": "varchar",
"char varying": "varchar",
"double precision": "float",
"time with time zone": "timetz",
"time without time zone": "time",
"timestamp with time zone": "timestamptz",
"timestamp without time zone": "timestamp",
);
const QoreTypeMap = (
"integer": "bigint",
"float": "double precision",
"number": "numeric",
"string": "varchar",
"date": "timestamp",
"binary": "bytea",
"bool": "boolean",
SqlUtil::CHAR: "char",
SqlUtil::CLOB: "text",
SqlUtil::BLOB: "bytea",
);
const PgsqlTableDescriptionHashOptions = AbstractTable::TableDescriptionHashOptions + (
"functions": Type::Hash,
);
const PgsqlColumnDescOptions = AbstractTable::ColumnDescOptions;
const PgsqlIndexOptions = AbstractTable::IndexOptions;
const PgsqlConstraintOptions = AbstractTable::ConstraintOptions + PgsqlIndexOptions + (
"index": Type::String,
);
const PgsqlTableCreationOptions = AbstractTable::TableCreationOptions + PgsqlConstraintOptions + (
"omit_trigger_functions": Type::Boolean,
);
const PgsqlAlignTableOptions = AbstractTable::AlignTableOptions + PgsqlTableCreationOptions;
const PgsqlCopMap = (
COP_CAST: (
"code": string (string cve, list args) {
string name = QoreTypeMap{args[0]} ?? args[0];
hash desc = PgsqlTypeMap{name};
string sql = sprintf ("cast (%s as %s", cve, name);
switch (name);
sql += ")";
return sql;
},
),
COP_YEAR: (
"code": string (string arg1, auto arg) {
return sprintf("to_char(%s, 'YYYY')", arg1);
}
),
COP_YEAR_MONTH: (
"code": string (string arg1, auto arg) {
return sprintf("to_char(%s, 'YYYY-MM')", arg1);
}
),
COP_YEAR_DAY: (
"code": string (string arg1, auto arg) {
return sprintf("to_char(%s, 'YYYY-MM-DD')", arg1);
}
),
COP_YEAR_HOUR: (
"code": string (string arg1, auto arg) {
return sprintf("to_char(%s, 'YYYY-MM-DD HH24')", arg1);
}
),
COP_SEQ: (
"nocolumn": True,
"withalias": True,
"code": string (*string cve, hash arg, reference<hash> psch) {
string sql = sprintf("nextval('%s')", arg.seq);
if (arg.as);
return sql;
}
),
COP_SEQ_CURRVAL: (
"nocolumn": True,
"withalias": True,
"code": string (*string cve, hash arg, reference<hash> psch) {
string sql = sprintf("currval('%s')", arg.seq);
if (arg.as);
return sql;
}
),
COP_TRUNC_DATE: (
"code": string sub(string arg1, auto arg) {
if (!PgsqlTruncDate.hasKey(arg));
return sprintf("date_trunc(%s, %s)", PgsqlTruncDate{arg}, arg1);
}
)
);
const PgsqlTruncDate = (
DT_YEAR : "'year'",
DT_MONTH : "'month'",
DT_DAY : "'day'",
DT_HOUR : "'hour'",
DT_MINUTE : "'minute'",
DT_SECOND : "'second'",
);
const PgsqlIopMap = DefaultIopMap + (
IOP_SEQ: (
"arg": Type::String,
"placeholder": "nextval(%v)",
),
IOP_SEQ_CURRVAL: (
"arg": Type::String,
"placeholder": "currval(%v)",
),
);
const PgsqlUopMap = DefaultUopMap + (
COP_SEQ: (
"nocolumn": True,
"code": string (*string cve, string arg) {
return sprintf("nextval('%s')", arg);
}
),
COP_SEQ_CURRVAL: (
"nocolumn": True,
"withalias": True,
"code": string (*string cve, string arg) {
return sprintf("currval('%s')", arg);
}
),
);
public:
private :
*string tablespace;
string schema;
Functions triggerFunctions;
public:
constructor(AbstractDatasource nds, string nname, *hash opts) ;
string getSchemaName();
*string getTablespaceName();
PgsqlFunction addTriggerFunction(string tfname, string src, string trigger);
bool hasArrayBind();
private:
PgsqlFunction addTriggerFunctionUnlocked(string tfname, string src, string trigger);
public:
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:
hash getInsertOperatorMap();
public:
private:
hash getRawUpdateOperatorMap();
public:
private:
bool checkExistenceImpl();
public:
private:
Columns describeImpl();
public:
private:
PgsqlPrimaryKey getPrimaryKeyImpl();
public:
private:
Indexes getIndexesImpl();
public:
private:
ForeignConstraints getForeignConstraintsImpl(*hash opts);
public:
private:
Constraints getConstraintsImpl();
public:
private:
Triggers getTriggersImpl();
public:
private:
string getCreateTableSqlImpl(*hash opt);
public:
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:
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:
bool emptyImpl();
public:
private:
clearImpl();
public:
private:
softlist getDropSqlImpl();
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:
auto tryExecArgsImpl(string sql, *softlist args);
public:
private:
auto tryExecRawImpl(string sql, *softlist args);
public:
private:
copyImpl(AbstractTable old);
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:
};
};
PgsqlSqlUtil::PgsqlView::viewowner
*string viewowner
Owner of the view.
Definition: PgsqlSqlUtil.qm.dox.h:589
PgsqlSqlUtil::PgsqlUniqueConstraint
class modeling a unique constraint
Definition: PgsqlSqlUtil.qm.dox.h:464
Date
const Date
COP_SEQ
const COP_SEQ
Hash
const Hash
PgsqlSqlUtil::PgsqlView
represents a PostgreSQL view
Definition: PgsqlSqlUtil.qm.dox.h:583
String
const String
DefaultIopMap
const DefaultIopMap
PgsqlSqlUtil::PgsqlCheckConstraint
represents a PostgreSQL-specific check constraint
Definition: PgsqlSqlUtil.qm.dox.h:325
sprintf
string sprintf(string fmt,...)
SqlUtil::AbstractTable
PgsqlSqlUtil::PgsqlDatabase
provides the PostgreSQL-specific implementation of the AbstractDatabase interface ...
Definition: PgsqlSqlUtil.qm.dox.h:696
PgsqlSqlUtil
the PgsqlSqlUtil namespace contains all the objects in the PgsqlSqlUtil module
Definition: PgsqlSqlUtil.qm.dox.h:216
SqlUtil::AbstractIndex
PgsqlSqlUtil::PgsqlColumn
represents a PostgreSQL-specific column
Definition: PgsqlSqlUtil.qm.dox.h:345
PgsqlSqlUtil::PgsqlTrigger
represents a PostgreSQL-specific trigger
Definition: PgsqlSqlUtil.qm.dox.h:613
PgsqlSqlUtil::PgsqlType
represents a PostgreSQL type
Definition: PgsqlSqlUtil.qm.dox.h:229
COP_SEQ_CURRVAL
const COP_SEQ_CURRVAL
SqlUtil::NumericColumnInfo
True
const True
SqlUtil::CHAR
const CHAR
PgsqlSqlUtil::PgsqlTriggerFunction::trigger
string trigger
trigger name
Definition: PgsqlSqlUtil.qm.dox.h:687
SqlUtil::AbstractSequence
PgsqlSqlUtil::PgsqlIndex
represents a PostgreSQL-specific index
Definition: PgsqlSqlUtil.qm.dox.h:274
number
number number(softnumber n)
COP_YEAR_HOUR
const COP_YEAR_HOUR
PgsqlSqlUtil::PgsqlTriggerFunction
represents a PostgreSQL-specific trigger function
Definition: PgsqlSqlUtil.qm.dox.h:682
IOP_SEQ_CURRVAL
const IOP_SEQ_CURRVAL
PgsqlSqlUtil::PgsqlType::getCreateSql
string getCreateSql(*hash opt)
returns a string that can be used to create the type in the database
PgsqlSqlUtil::PgsqlColumn::byte_size
int byte_size
byte size of the column
Definition: PgsqlSqlUtil.qm.dox.h:350
PgsqlSqlUtil::PgsqlIndex::tablespace
*string tablespace
the tablespace name of the index
Definition: PgsqlSqlUtil.qm.dox.h:279
SqlUtil::AbstractForeignConstraint
PgsqlSqlUtil::PgsqlNumericColumn
represents a PostgreSQL-specific numeric column
Definition: PgsqlSqlUtil.qm.dox.h:413
SqlUtil::AbstractCheckConstraint
list
list list(...)
Float
const Float
DT_DAY
const DT_DAY
Boolean
const Boolean
PgsqlSqlUtil::PgsqlType::getRenameSql
string getRenameSql(string new_name, *hash opt)
returns a string that can be used to rename a type
SZ_NUM
const SZ_NUM
PgsqlSqlUtil::PgsqlType::name
string name
the name of the type
Definition: PgsqlSqlUtil.qm.dox.h:234
Binary
const Binary
PgsqlSqlUtil::PgsqlUniqueConstraint::enabled
bool enabled
True if the constraint is enabled, False if not
Definition: PgsqlSqlUtil.qm.dox.h:469
COP_YEAR_MONTH
const COP_YEAR_MONTH
PgsqlSqlUtil::PgsqlTable::triggerFunctions
Functions triggerFunctions
contains any trigger functions supporting triggers on the table
Definition: PgsqlSqlUtil.qm.dox.h:1151
PgsqlSqlUtil::PgsqlUniqueConstraintCommon
common base class for unique constraints
Definition: PgsqlSqlUtil.qm.dox.h:426
SqlUtil::BLOB
const BLOB
SqlUtil::CLOB
const CLOB
PgsqlSqlUtil::PgsqlType::src
string src
the source of the type
Definition: PgsqlSqlUtil.qm.dox.h:237
PgsqlSqlUtil::PgsqlPrimaryKey
represents a PostgreSQL-specific primary key constraint
Definition: PgsqlSqlUtil.qm.dox.h:518
PgsqlSqlUtil::PgsqlType::constructor
constructor(string n_name, string n_src)
creates the type from the supplied arguments
SqlUtil::AbstractFunction
type
string type(auto arg)
COP_TRUNC_DATE
const COP_TRUNC_DATE
SqlUtil::AbstractView
Int
const Int
COP_YEAR
const COP_YEAR
string
string string(softstring str, *string enc)
PgsqlSqlUtil::PgsqlTable::tablespace
*string tablespace
tablespace name for the table, if known
Definition: PgsqlSqlUtil.qm.dox.h:1145
SqlUtil::AbstractTrigger
PgsqlSqlUtil::PgsqlForeignConstraint
represents a PostgreSQL-specific foreign constraint
Definition: PgsqlSqlUtil.qm.dox.h:305
SqlUtil::AbstractColumn
COP_CAST
const COP_CAST
DT_MINUTE
const DT_MINUTE
DT_HOUR
const DT_HOUR
DefaultUopMap
const DefaultUopMap
COP_YEAR_DAY
const COP_YEAR_DAY
DT_MONTH
const DT_MONTH
PgsqlSqlUtil::PgsqlType::getDropSql
string getDropSql(*hash opt)
returns a string that can be used to drop the function from the database
PgsqlSqlUtil::PgsqlTable::schema
string schema
schema name for the table
Definition: PgsqlSqlUtil.qm.dox.h:1148
hash
hash hash(object obj)
SZ_OPT
const SZ_OPT
PgsqlSqlUtil::PgsqlUniqueConstraintCommon::tablespace
*string tablespace
any tablespace for the unique key index
Definition: PgsqlSqlUtil.qm.dox.h:431
PgsqlSqlUtil::PgsqlSequence
class for PostgreSQL sequences
Definition: PgsqlSqlUtil.qm.dox.h:562
IOP_SEQ
const IOP_SEQ
SqlUtil::AbstractDatabase
PgsqlSqlUtil::get_table
PgsqlTable get_table(AbstractDatasource nds, string nname, *hash opts)
returns a PgsqlTable object corresponding to the arguments
DT_YEAR
const DT_YEAR
PgsqlSqlUtil::PgsqlTable
provides the PostgreSQL-specific implementation of the SqlUtil::AbstractTable interface ...
Definition: PgsqlSqlUtil.qm.dox.h:946
SqlUtil::AbstractPrimaryKey
Number
const Number
PgsqlSqlUtil::get_database
PgsqlDatabase get_database(AbstractDatasource nds, *hash opts)
returns a PgsqlDatabase object corresponding to the arguments
PgsqlSqlUtil::PgsqlFunction
represents a PostgreSQL-specific function
Definition: PgsqlSqlUtil.qm.dox.h:641
PgsqlSqlUtil::PgsqlType::equal
bool equal(PgsqlType type)
returns True if the types are equal
SqlUtil::AbstractUniqueConstraint
DT_SECOND
const DT_SECOND