307    parse_schema_name(
string nname, reference<string> schema, reference<string> name);
 
  351        list<hash<auto>> getTypeList();
 
  354        list<string> getModifySql(
PgsqlType old, *hash opt);
 
  387        constructor(
string n_name, 
bool n_unique, hash n_cols, *
string n_tablespace) ;
 
  426        softlist getRenameSql(
string table_name, 
string new_name);
 
  446        list getRenameSql(
string table_name, 
string new_name);
 
  468        constructor(
string n, 
string nt, *
string qt, 
int sz, 
bool nul, *
string dv, *
string cm, softint bs, *
int scale) ;
 
  538        constructor(
string n, 
string nt, *
string qt, 
int sz, 
bool nul, *
string dv, *
string cm, softint bs, softint 
scale) ;
 
  623        list<auto> getRenameSql(
string table_name, 
string new_name);
 
  684        constructor(
string n_name, number n_start = 1, number n_increment = 1, *softnumber n_end) ;
 
  708        constructor(
string n_name, 
string n_src, *
string n_schemaname, *
string n_viewowner)
 
  801        constructor(
string n, 
string n_src, 
string n_trigger) ;
 
  813            const PGSQL_TempSavepoint = 
"qore_pgsql_tmp_savepoint";
 
  828                "authorization": True,
 
  842                "currenttimestamp": True,
 
  875                "localtimestamp": True,
 
  916         list<string> featuresImpl();
 
  927         PgsqlSequence makeSequenceImpl(
string name, number start = 1, number increment = 1, *softnumber end, *hash 
opts);
 
  932         *AbstractSequence getSequenceImpl(
string name);
 
  937         *AbstractView getViewImpl(
string name);
 
  952         *AbstractFunction getFunctionImpl(
string name);
 
  957         AbstractFunction getProcedureImpl(
string name);
 
  961          static *
string getFunctionArgs(
string err, reference<string> src);
 
  966         list getDropSchemaSqlImpl(hash schema_hash, *hash opt);
 
  971         list getAlignSqlImpl(hash schema_hash, *hash opt);
 
 1000         list<string> listSequencesImpl();
 
 1005         list<string> listViewsImpl();
 
 1095         *
string getDbName();
 
 1118          static auto tryExecArgs(AbstractDatasource 
ds, 
string sql, *softlist<auto> args);
 
 1146            const PgsqlColumnDescOptions = AbstractTable::ColumnDescOptions;
 
 1148            const PgsqlIndexOptions = AbstractTable::IndexOptions;
 
 1150            const PgsqlConstraintOptions = ...;
 
 1153            const PgsqlTableCreationOptions = ...;
 
 1156            const PgsqlAlignTableOptions = AbstractTable::AlignTableOptions + PgsqlTableCreationOptions;
 
 1161                    "exp": <DataProviderExpressionInfo>{
 
 1162                        "type": DET_Operator,
 
 1165                        "desc": 
"cast operator",
 
 1168                            DataProviderSignatureAnyType,
 
 1169                            DataProviderSignatureStringValueType,
 
 1170                            DataProviderSignatureOptionalIntValueType,
 
 1171                            DataProviderSignatureOptionalIntValueType,
 
 1173                        "return_type": AbstractDataProviderTypeMap.
"any",
 
 1175                    "code": 
string sub (reference<hash<QueryInfo>> info, 
int role, list<auto> args) {
 
 1176                        string exp0 = info.table.getExpressionArg(\info, role, args[0],
 
 1177                            AbstractDataProviderTypeMap.
"any");
 
 1180                        string sql = sprintf (
"cast (%s as %s", exp0, 
name);
 
 1181                        if (desc.size == SZ_MAND) {
 
 1182                            if (!exists args[1] && !exists desc.size_range)
 
 1183                                throw "OPERATOR-ERROR", sprintf (
"cast operator missing size for type %s",
 
 1185                            sql += sprintf(
"(%d)", args[1] ?? desc.size_range[1]);
 
 1186                        } 
else if (desc.size == SZ_NUM && exists args[1]) {
 
 1187                            sql += sprintf(
"(%d", args[1]);
 
 1188                            sql += exists args[2] ? sprintf(
",%d)", args[2]) : 
")";
 
 1189                        } 
else if (desc.size == SZ_OPT && exists args[1]) {
 
 1190                            sql += sprintf(
"(%d)", args[1]);
 
 1197                    "exp": <DataProviderExpressionInfo>{
 
 1198                        "type": DET_Operator,
 
 1201                        "desc": 
"returns the year component of a date as a string (ex: `2022`)",
 
 1204                            DataProviderSignatureDateType,
 
 1206                        "return_type": AbstractDataProviderTypeMap.
"string",
 
 1208                    "code": 
string sub (reference<hash<QueryInfo>> info, 
int role, list<auto> args) {
 
 1209                        string exp0 = info.table.getExpressionArg(\info, role, args[0],
 
 1210                            AbstractDataProviderTypeMap.
"date");
 
 1211                        return sprintf(
"to_char(%s, 'YYYY')", exp0);
 
 1215                    "exp": <DataProviderExpressionInfo>{
 
 1216                        "type": DET_Operator,
 
 1217                        "label": COP_YEAR_MONTH,
 
 1218                        "name": COP_YEAR_MONTH,
 
 1219                        "desc": 
"returns the year and month components of a date as a string (ex: `2022-06`)",
 
 1220                        "symbol": COP_YEAR_MONTH,
 
 1222                            DataProviderSignatureDateType,
 
 1224                        "return_type": AbstractDataProviderTypeMap.
"string",
 
 1226                    "code": 
string sub (reference<hash<QueryInfo>> info, 
int role, list<auto> args) {
 
 1227                        string exp0 = info.table.getExpressionArg(\info, role, args[0],
 
 1228                            AbstractDataProviderTypeMap.
"date");
 
 1229                        return sprintf(
"to_char(%s, 'YYYY-MM')", exp0);
 
 1233                    "exp": <DataProviderExpressionInfo>{
 
 1234                        "type": DET_Operator,
 
 1235                        "label": COP_YEAR_DAY,
 
 1236                        "name": COP_YEAR_DAY,
 
 1237                        "desc": 
"returns the year, month, and day components of a date as a string (ex: `2022-06-29`)",
 
 1238                        "symbol": COP_YEAR_DAY,
 
 1240                            DataProviderSignatureDateType,
 
 1242                        "return_type": AbstractDataProviderTypeMap.
"string",
 
 1244                    "code": 
string sub (reference<hash<QueryInfo>> info, 
int role, list<auto> args) {
 
 1245                        string exp0 = info.table.getExpressionArg(\info, role, args[0],
 
 1246                            AbstractDataProviderTypeMap.
"date");
 
 1247                        return sprintf(
"to_char(%s, 'YYYY-MM-DD')", exp0);
 
 1251                    "exp": <DataProviderExpressionInfo>{
 
 1252                        "type": DET_Operator,
 
 1253                        "label": COP_YEAR_HOUR,
 
 1254                        "name": COP_YEAR_HOUR,
 
 1255                        "desc": 
"returns the year, month, day, and hour components of a date as a string " 
 1256                            "(ex: `2022-06-29 15`)",
 
 1257                        "symbol": COP_YEAR_HOUR,
 
 1259                            DataProviderSignatureDateType,
 
 1261                        "return_type": AbstractDataProviderTypeMap.
"string",
 
 1263                    "code": 
string sub (reference<hash<QueryInfo>> info, 
int role, list<auto> args) {
 
 1264                        string exp0 = info.table.getExpressionArg(\info, role, args[0],
 
 1265                            AbstractDataProviderTypeMap.
"date");
 
 1266                        return sprintf(
"to_char(%s, 'YYYY-MM-DD HH24')", exp0);
 
 1270                    "exp": <DataProviderExpressionInfo>{
 
 1271                        "type": DET_Operator,
 
 1272                        "label": COP_TRUNC_DATE,
 
 1273                        "name": COP_TRUNC_DATE,
 
 1274                        "desc": 
"truncates the given date to the given resolution; args: date, string code: Y: year, " 
 1275                            "M: month, D: day, H: hour, m: minute, S: second",
 
 1276                        "symbol": COP_TRUNC_DATE,
 
 1278                            DataProviderSignatureDateType,
 
 1279                            DataProviderSignatureStringValueType,
 
 1281                        "return_type": AbstractDataProviderTypeMap.
"date",
 
 1283                    "code": 
string sub(reference<hash<QueryInfo>> info, 
int role, list<auto> args) {
 
 1286                            throw "TRUNC-DATE-ERROR", sprintf(
"unknown date truncation format argument %y; " 
 1287                                "supported date format arguments: %y", args[1], keys 
PgsqlTruncDate);
 
 1289                        string exp0 = info.table.getExpressionArg(\info, role, args[0],
 
 1290                            AbstractDataProviderTypeMap.
"date");
 
 1291                        return sprintf(
"date_trunc(%s, %s)", str, exp0);
 
 1295                    "exp": <DataProviderExpressionInfo>{
 
 1296                        "type": DET_Operator,
 
 1299                        "desc": 
"returns the next value in the given sequence; args: sequence name",
 
 1302                            DataProviderSignatureStringValueType,
 
 1304                        "return_type": AbstractDataProviderTypeMap.
"int",
 
 1306                    "code": 
string sub (reference<hash<QueryInfo>> info, 
int role, list<auto> args) {
 
 1307                        return sprintf(
"nextval('%s')", args[0]);
 
 1311                    "exp": <DataProviderExpressionInfo>{
 
 1312                        "type": DET_Operator,
 
 1313                        "label": COP_SEQ_CURRVAL,
 
 1314                        "name": COP_SEQ_CURRVAL,
 
 1315                        "desc": 
"returns the current value in the given sequence; args: sequence name",
 
 1316                        "symbol": COP_SEQ_CURRVAL,
 
 1318                            DataProviderSignatureStringValueType,
 
 1320                        "return_type": AbstractDataProviderTypeMap.
"int",
 
 1322                    "code": 
string sub (reference<hash<QueryInfo>> info, 
int role, list<auto> args) {
 
 1323                        return sprintf(
"currval('%s')", args[0]);
 
 1331                    "code": 
string sub (
string cve, list<auto> args) {
 
 1334                        string sql = sprintf (
"cast (%s as %s", cve, 
name);
 
 1337                                if (desc.size == SZ_MAND) {
 
 1338                                    if (!exists args[1] && !exists desc.size_range)
 
 1339                                        throw "OPERATOR-ERROR", sprintf (
"op_cast operator missing size for type %s",
 
 1341                                    sql += sprintf(
"(%d)", args[1] ?? desc.size_range[1]);
 
 1342                                } 
else if (desc.size == SZ_NUM && exists args[1]) {
 
 1343                                    sql += sprintf(
"(%d", args[1]);
 
 1344                                    sql += exists args[2] ? sprintf(
",%d)", args[2]) : 
")";
 
 1345                                } 
else if (desc.size == SZ_OPT && exists args[1]) {
 
 1346                                    sql += sprintf(
"(%d)", args[1]);
 
 1354                    "code": 
string sub (
string arg1, 
auto arg) {
 
 1355                        return sprintf(
"to_char(%s, 'YYYY')", arg1);
 
 1359                    "code": 
string sub (
string arg1, 
auto arg) {
 
 1360                        return sprintf(
"to_char(%s, 'YYYY-MM')", arg1);
 
 1364                    "code": 
string sub (
string arg1, 
auto arg) {
 
 1365                        return sprintf(
"to_char(%s, 'YYYY-MM-DD')", arg1);
 
 1369                    "code": 
string sub (
string arg1, 
auto arg) {
 
 1370                        return sprintf(
"to_char(%s, 'YYYY-MM-DD HH24')", arg1);
 
 1376                    "code": 
string sub (*
string cve, hash arg, reference<hash> psch) {
 
 1377                        string sql = sprintf(
"nextval('%s')", arg.seq);
 
 1380                            sql += 
" " + arg.as;
 
 1388                    "code": 
string sub (*
string cve, hash arg, reference<hash> psch) {
 
 1389                        string sql = sprintf(
"currval('%s')", arg.seq);
 
 1392                            sql += 
" " + arg.as;
 
 1398                    "code": 
string sub(
string arg1, 
auto arg) {
 
 1400                            throw "COP-TRUNC-DATE-ERROR", sprintf(
"Not allowed format argument: %n: allowed: %n", arg,
 
 1462        PgsqlFunction addTriggerFunction(
string tfname, 
string src, 
string trigger);
 
 1498         code getUpsertAuto(Columns cols, hash<auto> row, *hash<auto> opt);
 
 1503         PgsqlFunction addTriggerFunctionUnlocked(
string tfname, 
string src, 
string trigger);
 
 1512         hash getTableCreationOptions();
 
 1517         hash getTableDescriptionHashOptions();
 
 1522         hash getColumnDescOptions();
 
 1527         hash getIndexOptions();
 
 1532         hash getConstraintOptions();
 
 1537         hash getAlignTableOptions();
 
 1564         bool checkExistenceImpl();
 
 1569         Columns describeImpl();
 
 1579         Indexes getIndexesImpl();
 
 1584         ForeignConstraints getForeignConstraintsImpl(*hash 
opts);
 
 1589         Constraints getConstraintsImpl();
 
 1594         Triggers getTriggersImpl();
 
 1605         *list getCreateMiscSqlImpl(*hash opt, 
bool cache);
 
 1610         *list getAlignSqlImpl(AbstractTable table, *hash<auto> opt);
 
 1621         string getRenameSqlImpl(
string new_name);
 
 1626         AbstractColumn addColumnImpl(
string cname, hash opt, 
bool nullable = True);
 
 1631         AbstractPrimaryKey addPrimaryKeyImpl(
string cname, hash ch, *hash opt);
 
 1636         AbstractIndex addIndexImpl(
string iname, 
bool enabled, hash ch, *hash opt);
 
 1641         AbstractForeignConstraint addForeignConstraintImpl(
string cname, hash<auto> ch, 
string table, hash<auto> tch, *hash<auto> opt);
 
 1646         AbstractCheckConstraint addCheckConstraintImpl(
string cname, 
string src, *hash opt);
 
 1651         AbstractUniqueConstraint addUniqueConstraintImpl(
string cname, hash ch, *hash opt);
 
 1656         AbstractTrigger addTriggerImpl(
string tname, 
string src, *hash opt);
 
 1661         bool tryInsertImpl(
string sql, hash<auto> row);
 
 1674         hash<auto> getQoreTypeMapImpl();
 
 1679         hash<auto> getTypeMapImpl();
 
 1703         softlist getDropSqlImpl();
 
 1708         setupTableImpl(hash<auto> desc, *hash<auto> opt);
 
 1761         *hash<auto> doReturningImpl(hash<auto> opt, reference<string> sql, list<auto> args);
 
 1766         list<auto> getGroupOrderByListUnlocked(hash<QueryInfo> info, 
string key, list<auto> coll);
 
represents a PostgreSQL-specific check constraint
Definition: PgsqlSqlUtilBase.qm.dox.h:435
 
string getCreateSql(string table_name, *hash opt)
returns a string that can be used to create the constraint in the database
 
constructor(string n, string n_src)
creates the constraint from the supplied arguments
 
string getCreateSql(string name, string table_name, *hash opt)
returns a string that can be used to create the constraint in the database
 
represents a PostgreSQL-specific column
Definition: PgsqlSqlUtilBase.qm.dox.h:455
 
int byte_size
byte size of the column
Definition: PgsqlSqlUtilBase.qm.dox.h:459
 
constructor(string n, string nt, *string qt, int sz, bool nul, *string dv, *string cm, softint bs, *int scale)
creates the column from the supplied arguments
 
string getNativeTypeString()
returns a string giving the native type of the column
 
constructor()
empty constructor for subclasses
 
string getRenameSql(AbstractTable t, string new_name)
returns a string that can be used to rename the column
 
list getModifySqlImpl(AbstractTable t, AbstractColumn col, *hash opt)
returns a list of sql strings that can be used to modify the column to the new definition
 
list getAddColumnSql(AbstractTable t)
returns a list of sql strings that can be used to add the column to an existing table
 
string getDdlName(string name)
returns the column name with quoting in case the column name is a reserved word
 
bool equalImpl(AbstractColumn c)
returns True if the argument is equal to the current object, False if not
 
provides the PostgreSQL-specific implementation of the AbstractDatabase interface
Definition: PgsqlSqlUtilBase.qm.dox.h:806
 
auto tryExecRawImpl(string sql, *softlist< auto > args)
tries to execute a command so that if an error occurs the current transaction status is not lost
 
ListIterator materializedViewIterator()
returns an iterator listing the string materialized view names in the database
 
const PgsqlReservedWords
hash (set) of reserved words
Definition: PgsqlSqlUtilBase.qm.dox.h:820
 
ListIterator typeIterator()
returns an iterator listing the string type names in the database
 
hash getSchemaDescriptionOptions()
returns driver-specific options to the base abstract class
 
const PgsqlReclaimSpaceOptions
Options for reclaimSpace()
Definition: PgsqlSqlUtilBase.qm.dox.h:816
 
list< string > listFunctionsImpl()
returns a list of string function names in the database
 
bool supportsTypesImpl()
returns True if the database supports named types
 
list< string > listTablesImpl()
returns a list of string table names in the database
 
list< string > listMaterializedViews()
returns a list of string materialized view names in the database
 
reclaimSpaceImpl(*hash options)
reclaim space implementation. See SqlUtil::AbstractDatabase::reclaimSpace()
 
bool rebuildIndexImpl(string name, *hash options)
rebuild index implementation. See SqlUtil::AbstractDatabase::rebuildIndex()
 
list< string > listProceduresImpl()
since PostgreSQL only supports functions, this method is identical to listFunctionsImpl()
 
auto tryExecArgsImpl(string sql, *softlist< auto > args)
tries to execute a command so that if an error occurs the current transaction status is not lost
 
softint getNextSequenceValueImpl(string name)
returns the next value in the given sequence
 
static string getCreateSql(list l)
returns a string that can be used to create the schema in the database
 
int getPhysicalSizeImpl()
SqlUtil::AbstractDatabase::getPhysicalSize()
 
bool supportsSequencesImpl()
returns True if the database supports sequences
 
hash getReclaimSpaceOptions()
returns driver-specific options to the base abstract class
 
string getCreateSqlImpl(list l)
returns a string that can be used to create the schema in the database
 
bool supportsPackagesImpl()
returns True if the database supports packages
 
const PgsqlSchemaDescriptionOptions
PostgreSQL-specific schema description keys.
Definition: PgsqlSqlUtilBase.qm.dox.h:810
 
static auto tryExecRaw(AbstractDatasource ds, string sql)
tries to execute a command so that if an error occurs the current transaction status is not lost
 
computeStatisticsImpl(*hash options)
compute statistics implementation. See SqlUtil::AbstractDatabase::computeStatistics()
 
static auto tryExecArgs(AbstractDatasource ds, string sql, *softlist< auto > args)
tries to execute a command so that if an error occurs the current transaction status is not lost
 
softint getCurrentSequenceValueImpl(string name)
returns the last value issued for the given sequence in the current session
 
list< string > listTypes()
returns a list of string type names in the database
 
represents a PostgreSQL-specific foreign constraint
Definition: PgsqlSqlUtilBase.qm.dox.h:411
 
string getDropSql(string table_name)
returns a string that can be used to drop the constraint from the database
 
string getCreateSql(string table_name, *hash opt)
returns a string that can be used to create the constraint in the database
 
constructor(string n, Columns c, ForeignConstraintTarget t)
creates the constraint from the supplied arguments
 
string getCreateSql(string name, string table_name, *hash< auto > opt)
returns a string that can be used to create the constraint in the database
 
represents a PostgreSQL-specific function
Definition: PgsqlSqlUtilBase.qm.dox.h:757
 
setName(string new_name)
sets the new name of the function
 
string getDropSql(*hash opt)
returns a string that can be used to drop the function from the database
 
bool equalImpl(AbstractFunctionBase t)
returns True if the argument is equal to the current object, False if not
 
softlist< string > getRenameSql(string new_name, *hash opt)
returns a string that can be used to rename the function in the database
 
softlist< string > getCreateSql(*hash opt)
returns a string that can be used to create the function in the database
 
represents a PostgreSQL-specific index
Definition: PgsqlSqlUtilBase.qm.dox.h:380
 
constructor(string n_name, bool n_unique, hash n_cols, *string n_tablespace)
creates the object from the arguments
 
*string tablespace
the tablespace name of the index
Definition: PgsqlSqlUtilBase.qm.dox.h:384
 
bool equalImpl(AbstractIndex ix)
returns True if the argument is equal to the current index, False if not
 
string getRenameSql(string table_name, string new_name)
returns a string that can be used to rename the index in the database
 
string getDropSql(string table_name)
returns a string that can be used to drop the index from the database
 
string getCreateSql(string table_name, *hash opt)
returns a string that can be used to create the index in the database
 
the data type for PostgreSQL NUMBER columns
Definition: PgsqlSqlUtilBase.qm.dox.h:299
 
constructor(string native_type, bool nullable, *hash< auto > options)
creates the object
 
represents a PostgreSQL-specific numeric column
Definition: PgsqlSqlUtilBase.qm.dox.h:534
 
string getNativeTypeString()
returns a string giving the native type of the column
 
constructor(string n, string nt, *string qt, int sz, bool nul, *string dv, *string cm, softint bs, softint scale)
creates the column from the supplied arguments
 
represents a PostgreSQL-specific primary key constraint
Definition: PgsqlSqlUtilBase.qm.dox.h:636
 
softlist getRenameSql(string table_name, string new_name)
returns a string that can be used to rename the constraint
 
string getCreateSql(string table_name, *hash< auto > opts)
returns a string that can be used to create the constraint
 
PgsqlColumn memberGate(string k)
returns the PgsqlColumn value of the given key if it exists, otherwise throws a KEY-ERROR exception
 
constructor(string n, *hash c, *string ts)
creates the object with the given attributes
 
constructor()
creates an empty primary key object
 
PostgreSQL savepoint helper.
Definition: PgsqlSqlUtilBase.qm.dox.h:311
 
constructor(AbstractDatasource ds, *string savepoint)
Creates the object.
 
deleteSavepointImpl()
Deletes the savepoint.
 
createSavepointImpl()
Creates the savepoint.
 
rollbackImpl()
Rolls back to the savepoint.
 
class for PostgreSQL sequences
Definition: PgsqlSqlUtilBase.qm.dox.h:680
 
constructor(string n_name, number n_start=1, number n_increment=1, *softnumber n_end)
creates the object from the arguments
 
string getCreateSql(*hash opt)
returns a string that can be used to create the sequence in the database
 
softlist getRenameSql(string new_name, *hash opt)
returns a string that can be used to rename the sequence in the database
 
provides the PostgreSQL-specific implementation of the SqlUtil::AbstractTable interface
Definition: PgsqlSqlUtilBase.qm.dox.h:1125
 
const PgsqlNameMap
maps from verbose type names to simple type names
Definition: PgsqlSqlUtilBase.qm.dox.h:1133
 
copyImpl(AbstractTable old)
db-specific copy actions
 
int server_version_sub
PostgreSQL server version.
Definition: PgsqlSqlUtilBase.qm.dox.h:1443
 
doSelectOrderByWithOffsetSqlUnlockedImpl(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< auto > getExpressionMap()
Returns the expression map for PostgreSQL.
 
const PgsqlIopMap
a hash of default value operator descriptions for PostgreSQL
Definition: PgsqlSqlUtilBase.qm.dox.h:1413
 
string getSqlName()
returns the name of the table to be used in SQL (with a possible qualifiers for schema,...
 
bool isDuplicateRowErrorImpl(hash< ExceptionInfo > ex)
Returns True if the exception was raised because of a duplicate row / key error.
 
const PgsqlUopMap
a hash of default update operator definitions for PostgreSQL
Definition: PgsqlSqlUtilBase.qm.dox.h:1417
 
hash getInsertOperatorMap()
returns the insert operator map for this object
 
bool has_atomic_merge
Set based on the postgreSQL server version.
Definition: PgsqlSqlUtilBase.qm.dox.h:1431
 
int server_version_major
PostgreSQL server major version.
Definition: PgsqlSqlUtilBase.qm.dox.h:1437
 
constructor(AbstractDatasource nds, string nname, *hash opts)
Creates the object from the arguments.
 
doSelectLimitOnlyUnlockedImpl(reference< hash< QueryInfo > > info, reference< string > sql)
processes a string for use in SQL select statements when there is a "limit" argument,...
 
auto tryExecArgsImpl(string sql, *softlist< auto > args)
tries to execute a command so that if an error occurs the current transaction status is not lost
 
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 handle...
 
const PgsqlCopMap
column operator specializations for PostgreSQL
Definition: PgsqlSqlUtilBase.qm.dox.h:1329
 
string getSchemaName()
returns the schema name
 
bool hasArrayBind()
returns False because the pgsql driver does not support array binds / bulk DML operations
 
const PgsqlTableDescriptionHashOptions
extends SqlUtil::AbstractTable::TableDescriptionHashOptions with "functions"
Definition: PgsqlSqlUtilBase.qm.dox.h:1143
 
string getColumnSqlName(string col)
returns the column name for use in SQL strings; subclasses can return a special string in case the co...
 
string getCreateSqlImpl(list l)
returns a string that can be used to create the table in the database
 
bool supportsTablespacesImpl()
returns True if the database support tablespaces
 
string getCreateTableSqlImpl(*hash opt)
returns a string that can be used to create the table in the database
 
int server_version_minor
PostgreSQL server minor version.
Definition: PgsqlSqlUtilBase.qm.dox.h:1440
 
const PgsqlTypeMap
maps PostgreSQL type names to type configurations
Definition: PgsqlSqlUtilBase.qm.dox.h:1129
 
AbstractSavepointHelper getSavepointHelperImpl(*string savepoint)
get DB-specific savepoint helper
 
string schema
schema name for the table
Definition: PgsqlSqlUtilBase.qm.dox.h:1425
 
transient Mutex pg_state()
Lock for atomicity for setting state info.
 
clearImpl()
clears PostgreSQL-specific table information
 
bool constraintsLinkedToIndexesImpl()
returns True if the database links constraints to indexes (ie dropping the constraint drops the index...
 
bool uniqueIndexCreatesConstraintImpl()
returns True if the database automatically creates a unique constraint when a unique index is created...
 
code getUpsertClosure(hash< auto > row, int upsert_strategy=UpsertAuto, *hash< auto > opt)
returns a closure for performing upserts
 
getServerVersion()
Sets the internal PostgreSQL server version.
 
auto tryExecRawImpl(string sql, *softlist< auto > args)
tries to execute a command so that if an error occurs the current transaction status is not lost
 
*string getSqlValueImpl(auto v)
returns a string for use in SQL queries representing the DB-specific value of the argument
 
const PgsqlTruncDate
Map SqlUtil::cop_trunc_date() constants to PostgreSQL internal masks.
Definition: PgsqlSqlUtilBase.qm.dox.h:1409
 
bool hasAtomicUpsert()
Returns True if the server supports atomic upsert/merge operations.
 
*string getTablespaceName()
returns the data tablespace name for the table or NOTHING if none is known
 
int server_version
PostgreSQL server full version code.
Definition: PgsqlSqlUtilBase.qm.dox.h:1434
 
list< auto > getColumnSqlNames(softlist< auto > cols)
returns a list of column names for use in SQL strings
 
hash getColumnOperatorMapImpl()
returns the column operator map for this object
 
Functions triggerFunctions
contains any trigger functions supporting triggers on the table
Definition: PgsqlSqlUtilBase.qm.dox.h:1428
 
const QoreTypeMap
maps qore type names to PostgreSQL type names
Definition: PgsqlSqlUtilBase.qm.dox.h:1137
 
hash getRawUpdateOperatorMap()
returns the raw (default) update operator map for this object
 
const PgsqlExpressionMap
Expression map for PostgreSQL.
Definition: PgsqlSqlUtilBase.qm.dox.h:1159
 
*string tablespace
tablespace name for the table, if known
Definition: PgsqlSqlUtilBase.qm.dox.h:1422
 
represents a PostgreSQL-specific trigger function
Definition: PgsqlSqlUtilBase.qm.dox.h:795
 
string trigger
trigger name
Definition: PgsqlSqlUtilBase.qm.dox.h:799
 
represents a PostgreSQL-specific trigger
Definition: PgsqlSqlUtilBase.qm.dox.h:726
 
softlist< string > getRenameSql(string table_name, string new_name)
returns a string that can be used to rename the trigger in the database
 
string getNormalizedSource(string src)
returns normalized source for comparisons
 
softlist< string > getCreateSql(string table_name, *hash opt)
returns a string that can be used to create the trigger in the database
 
bool equalImpl(AbstractFunctionBase t)
returns True if the argument is equal to the current object, False if not
 
constructor(string n, string n_src)
creates the object and sets its name and the trigger source
 
softlist< string > getDropSql(string table_name)
returns a string that can be used to drop the trigger from the database
 
represents a PostgreSQL type
Definition: PgsqlSqlUtilBase.qm.dox.h:338
 
string getDropSql(*hash opt)
returns a string that can be used to drop the function from the database
 
string name
the name of the type
Definition: PgsqlSqlUtilBase.qm.dox.h:342
 
string getCreateSql(*hash opt)
returns a string that can be used to create the type in the database
 
string getRenameSql(string new_name, *hash opt)
returns a string that can be used to rename a type
 
constructor(string n_name, string n_src)
creates the type from the supplied arguments
 
string src
the source of the type
Definition: PgsqlSqlUtilBase.qm.dox.h:345
 
bool equal(PgsqlType type)
returns True if the types are equal
 
common base class for unique constraints
Definition: PgsqlSqlUtilBase.qm.dox.h:547
 
bool setIndexBase(string ix)
sets the supporting index name
 
getIndexSql(reference< string > sql, string name, *hash opts)
adds index options onto the sql creation string
 
clearIndex()
clears any index base for the constraint
 
constructor(*string ts)
creates the constraint with an optional tablespace name
 
setTablespace(*string ts)
sets or clears the tablespace name
 
*string getTablespace()
returns the tablespace name used for this constraint, if known
 
*string tablespace
any tablespace for the unique key index
Definition: PgsqlSqlUtilBase.qm.dox.h:552
 
class modeling a unique constraint
Definition: PgsqlSqlUtilBase.qm.dox.h:582
 
constructor(string n, hash n_cols, bool e=True, *string ts)
creates the object with the given attributes
 
bool isEnabled()
returns True if the constraint is enabled, False if not
 
string getCreateSql(string name, string table_name, *hash< auto > opts)
returns a string that can be used to rename the constraint
 
PgsqlColumn memberGate(string k)
returns the PgsqlColumn value of the given key if it exists, otherwise throws a KEY-ERROR exception
 
string getCreateSql(string table_name, *hash opts)
returns a string that can be used to create the constraint
 
bool enabled
True if the constraint is enabled, False if not
Definition: PgsqlSqlUtilBase.qm.dox.h:587
 
represents a PostgreSQL view
Definition: PgsqlSqlUtilBase.qm.dox.h:701
 
softlist getRenameSql(string new_name, *hash opt)
returns a string that can be used to rename the view in the database
 
constructor(string n_name, string n_src, *string n_schemaname, *string n_viewowner)
creates the object from the arguments
 
*string viewowner
Owner of the view.
Definition: PgsqlSqlUtilBase.qm.dox.h:705
 
string getCreateSql(*hash opt)
returns a string that can be used to create the view in the database
 
transient AbstractDatasource ds
 
cache(*hash< auto > opts)
 
the PgsqlSqlUtilBase namespace contains all the objects in the PgsqlSqlUtilBase module
Definition: PgsqlSqlUtilBase.qm.dox.h:289
 
PgsqlTable get_table(AbstractDatasource nds, string nname, *hash< auto > opts)
returns a PgsqlTable object corresponding to the arguments
 
PgsqlDatabase get_database(AbstractDatasource nds, *hash< auto > opts)
returns a PgsqlDatabase object corresponding to the arguments