Qore SqlUtil Module Reference
1.7.5
|
Qore AbstractNumericDataType class definition. More...
Classes | |
class | AbstractCheckConstraint |
abstract class for check constraints More... | |
class | AbstractColumn |
the base class for column information More... | |
class | AbstractColumnConstraint |
the API for a constraint with columns More... | |
class | AbstractColumnSupportingConstraint |
the API for a constraint with columns More... | |
class | AbstractConstraint |
abstract base class for constraints More... | |
class | AbstractDdlObject |
the base class for named objects More... | |
class | AbstractForeignConstraint |
the base class for foreign key constraint information More... | |
class | AbstractFunction |
base class for functions More... | |
class | AbstractFunctionBase |
base class for function or objects with code More... | |
class | AbstractHashContainer |
abstract container class that throws an exception if an unknown key is accessed More... | |
class | AbstractIndex |
the abstract base class for index information More... | |
class | AbstractListContainer |
abstract container class that throws an exception if an unknown key is accessed More... | |
class | AbstractNumericDataType |
the data type for Oracle NUMBER columns More... | |
class | AbstractPrimaryKey |
represents a primary key More... | |
class | AbstractSavepointHelper |
Abstract base class for savepoint helpers for epheremal transaction support. More... | |
class | AbstractSequence |
base class for sequences More... | |
class | AbstractSqlUtilBase |
base class for abstract SqlUtil classes More... | |
class | AbstractTable |
the base abstract class for the table implementation More... | |
class | AbstractTrigger |
the base class for triggers More... | |
class | AbstractUniqueConstraint |
represents a unique column constraint More... | |
class | AbstractView |
base class for views More... | |
hashdecl | ColumnOperatorInfo |
column operator info hash as returned by all column operator functions More... | |
class | Columns |
column container class that throws an exception if an unknown column is accessed More... | |
class | Constraints |
constraint container class that throws an exception if an unknown constraint is accessed More... | |
class | Database |
represents a database; this class embeds an AbstractDatabase object that is created automatically in the constructor based on the database driver for the AbstractDatasource object providing the database connection More... | |
class | ForeignConstraints |
foreign constraint container class that throws an exception if an unknown constraint is accessed More... | |
class | ForeignConstraintTarget |
a class describing a foreign constraint target More... | |
class | Functions |
function container class that throws an exception if an unknown function is accessed More... | |
hashdecl | GenericColumnInfo |
generic column description hash in schema descriptions More... | |
class | Indexes |
index container class that throws an exception if an unknown index is accessed More... | |
hashdecl | InsertOperatorInfo |
insert operator info hash as returned by all insert operator functions More... | |
hashdecl | JoinOperatorInfo |
join operator info hash as returned by all join operator functions More... | |
hashdecl | OperatorInfo |
SQL operator info hash as returned by all operator functions. More... | |
hashdecl | SqlCommandInfo |
A hash describing SQL and arguments for an SQL DML command. More... | |
hashdecl | SqlResultInfo |
Return type for methods that return a result and also SQL info. More... | |
class | SqlUtilColumnDataType |
generic type for SQL datatypes where no translations are provided for NULL for "or nothing" types More... | |
class | SqlUtilColumnField |
SqlUtil column field class. More... | |
hashdecl | SqlUtilDataTypeOptionInfo |
column data type options More... | |
class | SqlUtilDateType |
type for date / timestamp columns More... | |
class | SqlUtilDbSpecificDataType |
data type for DB-specific types that are not convertible to other types More... | |
class | SqlUtilFloatType |
type for date / timestamp columns More... | |
class | SqlUtilIntType |
type for date / timestamp columns More... | |
class | SqlUtilStringType |
type for string / varchar / char columns More... | |
class | Table |
represents a database table; this class embeds an AbstractTable object that is created automatically in the constructor based on the database driver for the AbstractDatasource object providing the database connection More... | |
class | Tables |
the table container class stores a collection of tables in a schema More... | |
class | Triggers |
trigger container class that throws an exception if an unknown trigger is accessed More... | |
hashdecl | UpdateOperatorInfo |
update operator info hash as returned by all update operator functions More... | |
Functions | |
hash< ColumnOperatorInfo > | cop_append (auto column, string arg) |
returns a ColumnOperatorInfo hash for the "append" operator with the given argument More... | |
hash< ColumnOperatorInfo > | cop_as (auto column, string arg) |
returns a ColumnOperatorInfo hash for the "as" operator with the given argument More... | |
hash< ColumnOperatorInfo > | cop_avg (auto column) |
returns a ColumnOperatorInfo hash for the "avg" operator; returns average column values More... | |
hash< ColumnOperatorInfo > | cop_cast (auto column, string arg, auto arg1, auto arg2) |
returns a ColumnOperatorInfo hash for the "cast" operator with the given argument(s) More... | |
hash< ColumnOperatorInfo > | cop_coalesce (auto col1, auto col2) |
returns a ColumnOperatorInfo hash for the "coalesce" operator with the given column arguments; the first non-NULL column value will be returned More... | |
hash< ColumnOperatorInfo > | cop_count (auto column='') |
returns a ColumnOperatorInfo hash for the "count" operator; returns row counts More... | |
hash< ColumnOperatorInfo > | cop_cume_dist () |
Analytic/window function: relative rank of the current row. More... | |
hash< ColumnOperatorInfo > | cop_dense_rank () |
Analytic/window function: rank of the current row without gaps. More... | |
hash< ColumnOperatorInfo > | cop_distinct (auto column) |
returns a ColumnOperatorInfo hash for the "distinct" operator with the given argument; returns distinct column values More... | |
hash< ColumnOperatorInfo > | cop_divide (auto column1, auto column2) |
returns a ColumnOperatorInfo hash for the "/" operator with the given arguments More... | |
hash< ColumnOperatorInfo > | cop_first_value (any column) |
Analytic/window function: value evaluated at the row that is the first row of the window frame. More... | |
hash< ColumnOperatorInfo > | cop_last_value (any column) |
Analytic/window function: value evaluated at the row that is the last row of the window frame. More... | |
hash< ColumnOperatorInfo > | cop_length (auto column) |
returns a ColumnOperatorInfo hash for the "len" operator with the given argument; returns the length of the given text field More... | |
hash< ColumnOperatorInfo > | cop_lower (auto column) |
returns a ColumnOperatorInfo hash for the "lower" operator with the given argument; returns a column value in lower case More... | |
hash< ColumnOperatorInfo > | cop_max (auto column) |
returns a ColumnOperatorInfo hash for the "max" operator; returns maximum column values More... | |
hash< ColumnOperatorInfo > | cop_min (auto column) |
returns a ColumnOperatorInfo hash for the "min" operator; returns minimum column values More... | |
hash< ColumnOperatorInfo > | cop_minus (auto column1, auto column2) |
returns a ColumnOperatorInfo hash for the "-" operator with the given arguments More... | |
hash< ColumnOperatorInfo > | cop_multiply (auto column1, auto column2) |
returns a ColumnOperatorInfo hash for the "*" operator with the given arguments More... | |
hash< ColumnOperatorInfo > | cop_ntile (int value) |
Analytic/window function: integer ranging from 1 to the argument value, dividing the partition as equally as possible. More... | |
hash< ColumnOperatorInfo > | cop_over (auto column, *string partitionby, *string orderby) |
returns a ColumnOperatorInfo hash for the "over" clause More... | |
hash< ColumnOperatorInfo > | cop_percent_rank () |
Analytic/window function: relative rank of the current row. More... | |
hash< ColumnOperatorInfo > | cop_plus (auto column1, auto column2) |
returns a ColumnOperatorInfo hash for the "+" operator with the given arguments More... | |
hash< ColumnOperatorInfo > | cop_prepend (auto column, string arg) |
returns a ColumnOperatorInfo hash for the "prepend" operator with the given argument More... | |
hash< ColumnOperatorInfo > | cop_rank () |
Analytic/window function: rank of the current row with gaps. More... | |
hash< ColumnOperatorInfo > | cop_row_number () |
Analytic/window function: number of the current row within its partition, counting from 1. More... | |
hash< ColumnOperatorInfo > | cop_seq (string seq, *string as) |
returns a ColumnOperatorInfo hash for the "seq" operator with the given argument giving the sequence name whose value should be returned More... | |
hash< ColumnOperatorInfo > | cop_seq_currval (string seq, *string as) |
returns a ColumnOperatorInfo hash for the "seq_currval" operator with the given argument giving the sequence name whose current value should be returned More... | |
hash< ColumnOperatorInfo > | cop_substr (auto column, int start, *int count) |
returns a ColumnOperatorInfo hash for the "substr" operator with the given arguments; returns a substring of a column value More... | |
hash< ColumnOperatorInfo > | cop_sum (auto column) |
returns a ColumnOperatorInfo hash for the "sum" operator; returns the total sum of a numeric column. More... | |
hash< ColumnOperatorInfo > | cop_trunc_date (auto column, string mask) |
Truncates a date column or value regarding the given mask. The resulting value remains Qore::date (no conversion to eg. string) More... | |
hash< ColumnOperatorInfo > | cop_upper (auto column) |
returns a ColumnOperatorInfo hash for the "upper" operator with the given argument; returns a column value in upper case More... | |
hash< ColumnOperatorInfo > | cop_value (auto arg) |
returns a ColumnOperatorInfo hash for the "value" (literal) operator with the given argument More... | |
hash< ColumnOperatorInfo > | cop_year (auto column) |
returns a ColumnOperatorInfo hash for the "year" operator with the given argument More... | |
hash< ColumnOperatorInfo > | cop_year_day (auto column) |
returns a ColumnOperatorInfo hash for the "year_day" operator with the given argument More... | |
hash< ColumnOperatorInfo > | cop_year_hour (auto column) |
returns a ColumnOperatorInfo hash for the "year_hour" operator with the given argument More... | |
hash< ColumnOperatorInfo > | cop_year_month (auto column) |
returns a ColumnOperatorInfo hash for the "year_month" operator with the given argument More... | |
hash< InsertOperatorInfo > | iop_seq (string arg) |
returns an InsertOperatorInfo hash for retrieving the value of the given sequence in insert queries More... | |
hash< InsertOperatorInfo > | iop_seq_currval (string arg) |
returns an InsertOperatorInfo hash for retrieving the current value of the given sequence in insert queries More... | |
hash< string, hash< JoinOperatorInfo > > | join_inner (AbstractTable table, *string alias, *hash jcols, *hash cond, *hash< auto > opt) |
returns a hash for standard inner joins with the given arguments More... | |
hash< string, hash< JoinOperatorInfo > > | join_inner (string ta, AbstractTable table, *string alias, *hash jcols, *hash cond, *hash< auto > opt) |
returns a hash for standard inner joins with the given arguments for use when joining with a table other than the primary table More... | |
hash< string, hash< JoinOperatorInfo > > | join_inner (string ta, Table table, *string alias, *hash jcols, *hash cond, *hash< auto > opt) |
returns a hash for standard inner joins with the given arguments for use when joining with a table other than the primary table More... | |
hash< string, hash< JoinOperatorInfo > > | join_inner (string table_name, *string alias, *hash jcols, *hash cond, *hash< auto > opt) |
returns a hash for standard inner joins with the given arguments More... | |
hash< string, hash< JoinOperatorInfo > > | join_inner (Table table, *string alias, *hash jcols, *hash cond, *hash< auto > opt) |
returns a hash for standard inner joins with the given arguments More... | |
hash< string, hash< JoinOperatorInfo > > | join_inner_alias (string ta, string table_name, *string alias, *hash jcols, *hash cond, *hash< auto > opt) |
returns a hash for standard inner joins with the given arguments for use when joining with a table other than the primary table More... | |
hash< string, hash< JoinOperatorInfo > > | join_left (AbstractTable table, *string alias, *hash jcols, *hash cond, *hash< auto > opt) |
returns a hash for left outer joins with the given arguments More... | |
hash< string, hash< JoinOperatorInfo > > | join_left (string ta, AbstractTable table, *string alias, *hash jcols, *hash cond, *hash< auto > opt) |
returns a hash for left outer joins with the given arguments for use when joining with a table other than the primary table More... | |
hash< string, hash< JoinOperatorInfo > > | join_left (string ta, Table table, *string alias, *hash jcols, *hash cond, *hash< auto > opt) |
returns a hash for left outer joins with the given arguments for use when joining with a table other than the primary table More... | |
hash< string, hash< JoinOperatorInfo > > | join_left (string table_name, *string alias, *hash jcols, *hash cond, *hash< auto > opt) |
returns a hash for left outer joins with the given arguments More... | |
hash< string, hash< JoinOperatorInfo > > | join_left (Table table, *string alias, *hash jcols, *hash cond, *hash< auto > opt) |
returns a hash for left outer joins with the given arguments More... | |
hash< string, hash< JoinOperatorInfo > > | join_left_alias (string ta, string table_name, *string alias, *hash jcols, *hash cond, *hash< auto > opt) |
returns a hash for left outer joins with the given arguments for use when joining with a table other than the primary table More... | |
hash< string, hash< JoinOperatorInfo > > | join_right (AbstractTable table, *string alias, *hash jcols, *hash cond, *hash< auto > opt) |
returns a hash for right outer joins with the given arguments More... | |
hash< string, hash< JoinOperatorInfo > > | join_right (string ta, AbstractTable table, *string alias, *hash jcols, *hash cond, *hash< auto > opt) |
returns a hash for right outer joins with the given arguments for use when joining with a table other than the primary table More... | |
hash< string, hash< JoinOperatorInfo > > | join_right (string ta, Table table, *string alias, *hash jcols, *hash cond, *hash< auto > opt) |
returns a hash for right outer joins with the given arguments for use when joining with a table other than the primary table More... | |
hash< string, hash< JoinOperatorInfo > > | join_right (string table_name, *string alias, *hash jcols, *hash cond, *hash< auto > opt) |
returns a hash for right outer joins with the given arguments More... | |
hash< string, hash< JoinOperatorInfo > > | join_right (Table table, *string alias, *hash jcols, *hash cond, *hash< auto > opt) |
returns a hash for right outer joins with the given arguments More... | |
hash< string, hash< JoinOperatorInfo > > | join_right_alias (string ta, string table_name, *string alias, *hash jcols, *hash cond, *hash< auto > opt) |
returns a hash for right outer joins with the given arguments for use when joining with a table other than the primary table More... | |
hash< ColumnOperatorInfo > | make_cop (string cop, auto column, auto arg) |
returns a ColumnOperatorInfo hash More... | |
hash< InsertOperatorInfo > | make_iop (string iop, auto arg) |
returns an InsertOperatorInfo hash More... | |
hash< string, hash< JoinOperatorInfo > > | make_jop (string jop, AbstractTable table, *string alias, *hash jcols, *hash cond, *string ta, *hash< auto > opt) |
returns hash keyed with the table name assigned to a JoinOperatorInfo hash More... | |
hash< string, hash< JoinOperatorInfo > > | make_jop (string jop, string table_name, *string alias, *hash jcols, *hash cond, *string ta, *hash< auto > opt) |
returns a hash keyed with the table name assigned to a JoinOperatorInfo hash More... | |
hash< OperatorInfo > | make_op (string op, auto arg) |
returns an OperatorInfo hash | |
hash< UpdateOperatorInfo > | make_uop (string uop, auto arg, *hash< UpdateOperatorInfo > nest) |
returns an UpdateOperatorInfo hash More... | |
hash< OperatorInfo > | op_between (auto l, auto r) |
returns an OperatorInfo hash for the "between" operator with the given arguments, neither of which can be NULL or NOTHING; for use in where clauses More... | |
hash< OperatorInfo > | op_ceq (string arg) |
returns an OperatorInfo hash for the "=" operator with the given argument for use in where clauses when comparing the values of two columns More... | |
hash< OperatorInfo > | op_cge (string arg) |
returns an OperatorInfo hash for the ">=" operator with the given argument for use in where clauses when comparing the values of two columns More... | |
hash< OperatorInfo > | op_cgt (string arg) |
returns an OperatorInfo hash for the ">" operator with the given argument for use in where clauses when comparing the values of two columns More... | |
hash< OperatorInfo > | op_cle (string arg) |
returns an OperatorInfo hash for the "<=" operator with the given argument for use in where clauses when comparing the values of two columns More... | |
hash< OperatorInfo > | op_clt (string arg) |
returns an OperatorInfo hash for the "<" operator with the given argument for use in where clauses when comparing the values of two columns More... | |
hash< OperatorInfo > | op_cne (string arg) |
returns an OperatorInfo hash for the "!=" or "<>" operator with the given argument for use in where clauses when comparing the values of two columns More... | |
hash< OperatorInfo > | op_eq (auto arg) |
returns an OperatorInfo hash for the "=" operator with the given argument for use in where clauses when comparing column values to immediate values More... | |
hash< OperatorInfo > | op_ge (auto arg) |
returns an OperatorInfo hash for the ">=" operator with the given argument for use in where clauses when comparing column values to immediate values More... | |
hash< OperatorInfo > | op_gt (auto arg) |
returns an OperatorInfo hash for the ">" operator with the given argument for use in where clauses when comparing column values to immediate values More... | |
hash< OperatorInfo > | op_in () |
returns an OperatorInfo hash for the "in" operator with all arguments passed to the function; for use in where clauses More... | |
hash< OperatorInfo > | op_in (list< auto > args) |
returns an OperatorInfo hash for the "in" operator with the given argument list as the first argument; for use in where clauses More... | |
hash< OperatorInfo > | op_in_select (AbstractTable table, hash< auto > select_hash) |
returns an OperatorInfo hash for the "in" operator with a subquery as the argument; for use in where clauses More... | |
hash< OperatorInfo > | op_in_select (string table, hash< auto > select_hash) |
returns an OperatorInfo hash for the "in" operator with a subquery as the argument; for use in where clauses More... | |
hash< OperatorInfo > | op_in_select (Table table, hash< auto > select_hash) |
returns an OperatorInfo hash for the "in" operator with a subquery as the argument; for use in where clauses More... | |
hash< OperatorInfo > | op_le (auto arg) |
returns an OperatorInfo hash for the "<=" operator with the given argument for use in where clauses when comparing column values to immediate values More... | |
hash< OperatorInfo > | op_like (string str) |
returns an OperatorInfo hash for the "like" operator with the given argument for use in where clauses More... | |
hash< OperatorInfo > | op_lt (auto arg) |
returns an OperatorInfo hash for the "<" operator with the given argument for use in where clauses when comparing column values to immediate values More... | |
hash< OperatorInfo > | op_ne (auto arg) |
returns an OperatorInfo hash for the "!=" or "<>" operator with the given argument for use in where clauses when comparing column values to immediate values More... | |
hash< OperatorInfo > | op_not (hash arg) |
returns an OperatorInfo hash for the "not" operator; for use in where clauses More... | |
hash< OperatorInfo > | op_substr (int start, *int count, string text) |
returns an OperatorInfo hash for the "substr" operator with the given arguments; for use in where clauses More... | |
hash< OperatorInfo > | op_substr (int start, string text) |
returns an OperatorInfo hash for the "substr" operator with the given arguments; for use in where clauses More... | |
sqlutil_register_ds_deserializer (*code new_ds_get) | |
registers a closure or call reference taking a string type and string datasource configuration that will return an AbstractDatasource | |
sqlutil_register_ds_serializer (*code new_ds_do) | |
registers a closure or call reference taking a string type and string datasource configuration that will return an AbstractDatasource | |
hash< UpdateOperatorInfo > | uop_append (string arg, *hash< UpdateOperatorInfo > nest) |
returns an UpdateOperatorInfo hash for the "append" or concatenate operator with the given argument More... | |
hash< UpdateOperatorInfo > | uop_divide (auto arg, *hash< UpdateOperatorInfo > nest) |
returns an UpdateOperatorInfo hash for the "/" operator with the given arguments More... | |
hash< UpdateOperatorInfo > | uop_lower (*hash< UpdateOperatorInfo > nest) |
returns an UpdateOperatorInfo hash for the "lower" operator with the given argument; returns a column value in lower case More... | |
hash< UpdateOperatorInfo > | uop_minus (auto arg, *hash< UpdateOperatorInfo > nest) |
returns an UpdateOperatorInfo hash for the "-" operator with the given arguments More... | |
hash< UpdateOperatorInfo > | uop_multiply (auto arg, *hash< UpdateOperatorInfo > nest) |
returns an UpdateOperatorInfo hash for the "*" operator with the given arguments More... | |
hash< UpdateOperatorInfo > | uop_plus (auto arg, *hash< UpdateOperatorInfo > nest) |
returns an UpdateOperatorInfo hash for the "+" operator with the given arguments More... | |
hash< UpdateOperatorInfo > | uop_prepend (string arg, *hash< UpdateOperatorInfo > nest) |
returns an UpdateOperatorInfo hash for the "prepend" operator with the given argument More... | |
hash< UpdateOperatorInfo > | uop_seq (string seq) |
returns an UpdateOperatorInfo hash for the "seq" operator with the given argument giving the sequence name whose value should be returned More... | |
hash< UpdateOperatorInfo > | uop_seq_currval (string seq) |
returns an UpdateOperatorInfo hash for the "seq" operator with the given argument giving the sequence name whose current value should be returned More... | |
hash< UpdateOperatorInfo > | uop_substr (int start, *int count, *hash< UpdateOperatorInfo > nest) |
returns an UpdateOperatorInfo hash for the "substr" operator with the given arguments; returns a substring of a column value More... | |
hash< UpdateOperatorInfo > | uop_upper (*hash< UpdateOperatorInfo > nest) |
returns an UpdateOperatorInfo hash for the "upper" operator with the given argument; returns a column value in upper case More... | |
hash< string, hash< OperatorInfo > > | wop_or (hash h1, hash h2) |
returns an OperatorInfo hash with a fake "_OR_" column name; the list of arguments to the function is combined such that each hash in the list generates SQL expressions combined with "and" logic, and each of those clauses is combined with "or" logic; this is for use in where clauses More... | |
Variables | |
const | BLOB = "blob" |
specifies a large variable-length binary column (ie BLOB or BYTEA , etc) | |
const | CHAR = "char" |
specifies a CHAR column | |
const | CLOB = "clob" |
specifies a large variable-length character column (ie CLOB or TEXT , etc) | |
const | COP_APPEND = "append" |
to append a string to a column on output More... | |
const | COP_AS = "as" |
to rename a column on output More... | |
const | COP_AVG = "avg" |
to return the average value More... | |
const | COP_CAST = "cast" |
to convert column value into another datatype More... | |
const | COP_COALESCE = "coalesce" |
to return the first non-null argument in the list More... | |
const | COP_COUNT = "count" |
to return the row count More... | |
const | COP_CUME_DIST = "cume_dist" |
Analytic (window) function: CUME_DIST. More... | |
const | COP_DENSE_RANK = "dense_rank" |
Analytic (window) function: DENSE_RANK. More... | |
const | COP_DISTINCT = "distinct" |
to return distinct values More... | |
const | COP_DIVIDE = "divide" |
the SQL "divide" operator More... | |
const | COP_FIRST_VALUE = "first_value" |
Analytic (window) function: FIRST_VALUE. More... | |
const | COP_LAST_VALUE = "last_value" |
Analytic (window) function: LAST_VALUE. More... | |
const | COP_LENGTH = "length" |
to get the length of a text field More... | |
const | COP_LOWER = "lower" |
to return column value in lower case More... | |
const | COP_MAX = "max" |
to return the maximum value More... | |
const | COP_MIN = "min" |
to return the minimum value More... | |
const | COP_MINUS = "minus" |
the SQL "minus" operator More... | |
const | COP_MULTIPLY = "multiply" |
the SQL "multiply" operator More... | |
const | COP_NTILE = "ntile" |
Analytic (window) function: NTILE. More... | |
const | COP_OVER = "over" |
the SQL "over" clause More... | |
const | COP_PERCENT_RANK = "percent_rank" |
Analytic (window) function: PERCENT_RANK. More... | |
const | COP_PLUS = "plus" |
the SQL "plus" operator More... | |
const | COP_PREPEND = "prepend" |
to prepend a string to a column on output More... | |
const | COP_RANK = "rank" |
Analytic (window) function: RANK. More... | |
const | COP_ROW_NUMBER = "row_number" |
Analytic (window) function: ROW_NUMBER. More... | |
const | COP_SEQ = "seq" |
to return the next value of a sequence More... | |
const | COP_SEQ_CURRVAL = "seq_currval" |
to return the last value of a sequence issued in the same session More... | |
const | COP_SUBSTR = "substr" |
to extract a substring from a column More... | |
const | COP_SUM = "sum" |
to return the sum value More... | |
const | COP_TRUNC_DATE = "truncate_date" |
to return the date with truncated value More... | |
const | COP_UPPER = "upper" |
to return column value in upper case More... | |
const | COP_VALUE = "value" |
to append a constant value (SQL Literal) to use as an output column value More... | |
const | COP_YEAR = "year" |
to return a date value with year information only More... | |
const | COP_YEAR_DAY = "year_day" |
to return a date value with year to day information More... | |
const | COP_YEAR_HOUR = "year_hour" |
to return a date value with year to hextern information More... | |
const | COP_YEAR_MONTH = "year_month" |
to return a date value with year to month information More... | |
const | DB_FUNCTIONS = "functions" |
Features constants. More... | |
const | DB_MVIEWS = "materialized views" |
Feature: materialized views / snapshots. | |
const | DB_PACKAGES = "packages" |
Feature: packages. | |
const | DB_PROCEDURES = "procedures" |
Feature: procedures. | |
const | DB_SEQUENCES = "sequences" |
Feature: sequences. | |
const | DB_SYNONYMS = "synonyms" |
Feature: synonyms. | |
const | DB_TABLES = "tables" |
Feature: tables. | |
const | DB_TYPES = "named types" |
Feature: named types. | |
const | DB_VIEWS = "views" |
Feature: views. | |
const | DefaultCopMap = ... |
a hash of default column operator descriptions | |
const | DefaultIopMap = {} |
a hash of default insert operator descriptions (currently empty, all operators are driver-dependent) | |
const | DefaultOpMap = ... |
a hash of valid operators for use in Where Clauses | |
const | DefaultUopMap = ... |
a hash of valid update operators | |
const | DT_DAY = "D" |
Format unit: day. | |
const | DT_HOUR = "H" |
Format unit: hour. | |
const | DT_MINUTE = "m" |
Format unit: minute. | |
const | DT_MONTH = "M" |
Format unit: month. | |
const | DT_SECOND = "S" |
Format unit: hour. | |
const | DT_YEAR = "Y" |
Format unit: year. | |
const | IOP_SEQ = "seq" |
for using the value of a sequence More... | |
const | IOP_SEQ_CURRVAL = "seq_currval" |
for using the last value of a sequence issued in the current session More... | |
const | JOP_INNER = "inner" |
for standard inner joins More... | |
const | JOP_LEFT = "left" |
for left outer joins More... | |
const | JOP_RIGHT = "right" |
for right outer joins More... | |
const | JopMap = ... |
a hash of valid join operators | |
const | NUMERIC = "number" |
specifies a numeric column (equivalent to Qore::Type::Number) | |
const | OP_BETWEEN = "between" |
the SQL "between" operator for use in Where Clauses More... | |
const | OP_CEQ = "C=" |
the SQL equals operator (=) for use in Where Clauses More... | |
const | OP_CGE = "C>=" |
the SQL greater than or equals operator (>=) for use in Where Clauses More... | |
const | OP_CGT = "C>" |
the SQL greater than operator (>) for use in Where Clauses More... | |
const | OP_CLE = "C<=" |
the SQL less than or equals (<=) operator for use in Where Clauses More... | |
const | OP_CLT = "C<" |
the SQL less than (<) operator for use in Where Clauses when comparing two columns More... | |
const | OP_CNE = "C!=" |
the SQL not equals operator (!= or <>) for use in Where Clauses More... | |
const | OP_EQ = "=" |
the SQL equals operator (=) for use in Where Clauses More... | |
const | OP_GE = ">=" |
the SQL greater than or equals operator (>=) for use in Where Clauses More... | |
const | OP_GT = ">" |
the SQL greater than operator (>) for use in Where Clauses More... | |
const | OP_IN = "in" |
the SQL "in" operator for use in Where Clauses More... | |
const | OP_IN_SELECT = "in_select" |
the SQL "in" operator with a select query for use in Where Clauses More... | |
const | OP_LE = "<=" |
the SQL less than or equals (<=) operator for use in Where Clauses More... | |
const | OP_LIKE = "like" |
the SQL "like" operator for use in Where Clauses More... | |
const | OP_LT = "<" |
the SQL less than (<) operator for use in Where Clauses More... | |
const | OP_NE = "!=" |
the SQL not equals operator (!= or <>) for use in Where Clauses More... | |
const | OP_NOT = "not" |
the SQL "not" operator for use in Where Clauses More... | |
const | OP_OR = "or" |
to combine SQL expressions with "or" for use in Where Clauses More... | |
const | OP_SUBSTR = "substr" |
the SQL "substr" operator for use in Where Clauses More... | |
const | SqlUtilDrivers = ... |
known drivers | |
const | SZ_MAND = 1 |
the data type takes a mandatory size parameter | |
const | SZ_NONE = 0 |
the data type does not take a size parameter | |
const | SZ_NUM = 3 |
the data type is numeric so takes an optional precision and scale | |
const | SZ_OPT = 2 |
the data type takes an optional size parameter | |
const | VARCHAR = "string" |
specifies a VARCHAR column (equivalent to Qore::Type::String) | |
Qore AbstractNumericDataType class definition.
Qore SqlUtilStringType class definition.
Qore SqlUtilIntType class definition.
Qore SqlUtilFloatType class definition.
Qore SqlUtilDbSpecificDataType class definition.
Qore SqlUtilDateType class definition.
Qore SqlUtilColumnField class definition.
Qore SqlUtilColumnDataType class definition.
the SqlUtil namespace contains all the objects in the SqlUtil module
Qore SqlResultInfo hash definition.
Qore Database class definition.
Qore AbstractTable class definition.
Qore AbstractSqlUtilBase class definition.
Qore AbstractSavepointHelper class definition.
AbstractNumericDataType.qc Copyright 2022 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. strict argument handling contains all public definitions in the SqlUtil module
AbstractSavepointHelper.qc Copyright 2022 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. strict argument handling contains all public definitions in the SqlUtil module
AbstractSqlUtilBase.qc Copyright 2022 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. contains all public definitions in the SqlUtil module
AbstractTable.qc Copyright 2019 - 2022 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. contains all public definitions in the SqlUtil module
Database.qc Copyright 2022 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. strict argument handling contains all public definitions in the SqlUtil module
SqlResultInfo.qc Copyright 2022 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. contains all public definitions in the SqlUtil module
SqlUtilColumnDataType.qc Copyright 2022 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. strict argument handling contains all public definitions in the SqlUtil module
SqlUtilColumnField.qc Copyright 2022 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. strict argument handling contains all public definitions in the SqlUtil module
SqlUtilDateType.qc Copyright 2022 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. strict argument handling contains all public definitions in the SqlUtil module
SqlUtilDbSpecificDataType.qc Copyright 2022 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. strict argument handling contains all public definitions in the SqlUtil module
SqlUtilFloatType.qc Copyright 2022 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. strict argument handling contains all public definitions in the SqlUtil module
SqlUtilIntType.qc Copyright 2022 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. strict argument handling contains all public definitions in the SqlUtil module
SqlUtilStringType.qc Copyright 2022 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. strict argument handling contains all public definitions in the SqlUtil module
Table.qc Copyright 2019 - 2022 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. contains all public definitions in the SqlUtil module
hash<ColumnOperatorInfo> SqlUtil::cop_append | ( | auto | column, |
string | arg | ||
) |
returns a ColumnOperatorInfo hash for the "append"
operator with the given argument
column | the column specification for the column (string name or dot notation for use in joins) |
arg | the text to append (ie concatenate) to the row values in the output column |
hash<ColumnOperatorInfo> SqlUtil::cop_as | ( | auto | column, |
string | arg | ||
) |
returns a ColumnOperatorInfo hash for the "as"
operator with the given argument
column | the column specification for the column (string name or dot notation for use in joins) or any other column "cop_..." function |
arg | the new name of the output column |
hash<ColumnOperatorInfo> SqlUtil::cop_avg | ( | auto | column | ) |
returns a ColumnOperatorInfo hash for the "avg"
operator; returns average column values
column | the column specification for the column (string name or dot notation for use in joins) |
hash<ColumnOperatorInfo> SqlUtil::cop_cast | ( | auto | column, |
string | arg, | ||
auto | arg1, | ||
auto | arg2 | ||
) |
returns a ColumnOperatorInfo hash for the "cast"
operator with the given argument(s)
column | the column specification for the column (string name or dot notation for use in joins) or any other column "cop_..." function |
arg | the new datatype to cast the column value(s) to |
arg1 | optional, type dependent, specification (e.g. size or precision) |
arg2 | optional, type dependent, specification (e.g. scale) |
hash<ColumnOperatorInfo> SqlUtil::cop_coalesce | ( | auto | col1, |
auto | col2 | ||
) |
returns a ColumnOperatorInfo hash for the "coalesce"
operator with the given column arguments; the first non-NULL column value will be returned
col1 | the name or column operator hash for the first value |
col2 | the name or column operator hash for the second value, additional values should follow this argument |
COALESCE-ERROR | the arguments must be either string column designators or column operator hashes |
hash<ColumnOperatorInfo> SqlUtil::cop_count | ( | auto | column = '' | ) |
returns a ColumnOperatorInfo hash for the "count"
operator; returns row counts
hash<ColumnOperatorInfo> SqlUtil::cop_cume_dist | ( | ) |
Analytic/window function: relative rank of the current row.
Analytic/window function. Must be used with cop_over() with partitionby
and orderby
arguments
hash<ColumnOperatorInfo> SqlUtil::cop_dense_rank | ( | ) |
Analytic/window function: rank of the current row without gaps.
Analytic/window function. Must be used with cop_over() with partitionby
and orderby
arguments
hash<ColumnOperatorInfo> SqlUtil::cop_distinct | ( | auto | column | ) |
returns a ColumnOperatorInfo hash for the "distinct"
operator with the given argument; returns distinct column values
column | the column specification for the column (string name or dot notation for use in joins) |
hash<ColumnOperatorInfo> SqlUtil::cop_divide | ( | auto | column1, |
auto | column2 | ||
) |
returns a ColumnOperatorInfo hash for the "/"
operator with the given arguments
column1 | the column specification for the first argument (string name or dot notation for use in joins) |
column2 | the column specification for the second argument (string name or dot notation for use in joins) |
hash<ColumnOperatorInfo> SqlUtil::cop_first_value | ( | any | column | ) |
Analytic/window function: value evaluated at the row that is the first row of the window frame.
Analytic/window function. Must be used with cop_over() with partitionby
and orderby
arguments
hash<ColumnOperatorInfo> SqlUtil::cop_last_value | ( | any | column | ) |
Analytic/window function: value evaluated at the row that is the last row of the window frame.
Analytic/window function. Must be used with cop_over() with partitionby
and orderby
arguments
hash<ColumnOperatorInfo> SqlUtil::cop_length | ( | auto | column | ) |
returns a ColumnOperatorInfo hash for the "len"
operator with the given argument; returns the length of the given text field
column | the column specification for the column (string name or dot notation for use in joins) |
hash<ColumnOperatorInfo> SqlUtil::cop_lower | ( | auto | column | ) |
returns a ColumnOperatorInfo hash for the "lower"
operator with the given argument; returns a column value in lower case
column | the column specification for the column (string name or dot notation for use in joins) |
hash<ColumnOperatorInfo> SqlUtil::cop_max | ( | auto | column | ) |
returns a ColumnOperatorInfo hash for the "max"
operator; returns maximum column values
column | the column specification for the column (string name or dot notation for use in joins) |
hash<ColumnOperatorInfo> SqlUtil::cop_min | ( | auto | column | ) |
returns a ColumnOperatorInfo hash for the "min"
operator; returns minimum column values
column | the column specification for the column (string name or dot notation for use in joins) |
hash<ColumnOperatorInfo> SqlUtil::cop_minus | ( | auto | column1, |
auto | column2 | ||
) |
returns a ColumnOperatorInfo hash for the "-"
operator with the given arguments
column1 | the column specification for the first argument (string name or dot notation for use in joins) |
column2 | the column specification for the second argument (string name or dot notation for use in joins) |
hash<ColumnOperatorInfo> SqlUtil::cop_multiply | ( | auto | column1, |
auto | column2 | ||
) |
returns a ColumnOperatorInfo hash for the "*"
operator with the given arguments
column1 | the column specification for the first argument (string name or dot notation for use in joins) |
column2 | the column specification for the second argument (string name or dot notation for use in joins) |
hash<ColumnOperatorInfo> SqlUtil::cop_ntile | ( | int | value | ) |
Analytic/window function: integer ranging from 1 to the argument value, dividing the partition as equally as possible.
Analytic/window function. Must be used with cop_over() with partitionby
and orderby
arguments
value | an integer value used as count of sp;it buckets |
hash<ColumnOperatorInfo> SqlUtil::cop_over | ( | auto | column, |
*string | partitionby, | ||
*string | orderby | ||
) |
returns a ColumnOperatorInfo hash for the "over"
clause
hash<ColumnOperatorInfo> SqlUtil::cop_percent_rank | ( | ) |
Analytic/window function: relative rank of the current row.
Analytic/window function. Must be used with cop_over() with partitionby
and orderby
arguments
hash<ColumnOperatorInfo> SqlUtil::cop_plus | ( | auto | column1, |
auto | column2 | ||
) |
returns a ColumnOperatorInfo hash for the "+"
operator with the given arguments
column1 | the column specification for the first argument (string name or dot notation for use in joins) |
column2 | the column specification for the second argument (string name or dot notation for use in joins) |
hash<ColumnOperatorInfo> SqlUtil::cop_prepend | ( | auto | column, |
string | arg | ||
) |
returns a ColumnOperatorInfo hash for the "prepend"
operator with the given argument
column | the column specification for the column (string name or dot notation for use in joins) |
arg | the text to prepend to the row values in the output column |
hash<ColumnOperatorInfo> SqlUtil::cop_rank | ( | ) |
Analytic/window function: rank of the current row with gaps.
Analytic/window function. Must be used with cop_over() with partitionby
and orderby
arguments
hash<ColumnOperatorInfo> SqlUtil::cop_row_number | ( | ) |
Analytic/window function: number of the current row within its partition, counting from 1.
Analytic/window function. Must be used with cop_over() with partitionby
and orderby
arguments
hash<ColumnOperatorInfo> SqlUtil::cop_seq | ( | string | seq, |
*string | as | ||
) |
returns a ColumnOperatorInfo hash for the "seq"
operator with the given argument giving the sequence name whose value should be returned
seq | the name of the sequence whose value should be returned |
as | an optional column name that should be returned for the sequence value (so that SqlUtil::cop_as() need not be used) |
hash<ColumnOperatorInfo> SqlUtil::cop_seq_currval | ( | string | seq, |
*string | as | ||
) |
returns a ColumnOperatorInfo hash for the "seq_currval"
operator with the given argument giving the sequence name whose current value should be returned
seq | the name of the sequence whose current value should be returned |
as | an optional column name that should be returned for the sequence value (so that SqlUtil::cop_as() need not be used) |
hash<ColumnOperatorInfo> SqlUtil::cop_substr | ( | auto | column, |
int | start, | ||
*int | count | ||
) |
returns a ColumnOperatorInfo hash for the "substr"
operator with the given arguments; returns a substring of a column value
column | the column specification for the column (string name or dot notation for use in joins) |
start | position where the substring starts |
count | length of the substring in characters |
hash<ColumnOperatorInfo> SqlUtil::cop_sum | ( | auto | column | ) |
returns a ColumnOperatorInfo hash for the "sum"
operator; returns the total sum of a numeric column.
column | the column specification for the column (string name or dot notation for use in joins) |
hash<ColumnOperatorInfo> SqlUtil::cop_trunc_date | ( | auto | column, |
string | mask | ||
) |
Truncates a date column or value regarding the given mask. The resulting value remains Qore::date (no conversion to eg. string)
column | the column specification for the column (string name or dot notation for use in joins) |
mask | the string with one of specified values rederenced in cop_trunc_date formats |
hash<ColumnOperatorInfo> SqlUtil::cop_upper | ( | auto | column | ) |
returns a ColumnOperatorInfo hash for the "upper"
operator with the given argument; returns a column value in upper case
column | the column specification for the column (string name or dot notation for use in joins) |
hash<ColumnOperatorInfo> SqlUtil::cop_value | ( | auto | arg | ) |
returns a ColumnOperatorInfo hash for the "value"
(literal) operator with the given argument
arg | the value to be returned in the column |
SQL literals can be useful in some cases - as dummy values for select statements where there is exact columns required, unions, expected values for arc.insertFromIterator
(src.getStatement(sh)) "insert as select", etc.
The term literal refers to a fixed data value. For example, 123, 'foobar' etc.
Mapping of Qore values to literals:
Qore Type | SQL Type | Qore Example | SQL interpretation |
Integer | NUMBER as it is | 123 | 123 |
Float | NUMBER as it is | 12.3 | 12.3 |
Numeric | NUMBER as it is | 1.2n | 1.2 |
Date | String representation of the date using DB native implementation like TO_TIMESTAMP for Oracle. | now() | to_timestamp ('20150421104825000000', 'YYYYMMDDHH24MISSFF6') |
Bool | Internal representation of the bool value using DB native implementation | True | 1 |
String | Standard and escaped string literal. No additional literal methods like Oracle's nq{foobar} are supported now | "foo bar" | 'foo bar' |
NULL | Direct null literal | NULL | null |
NOTHING | Direct null literal | NOTHING | null |
The most useful SqlUtil::cop_value() usage is with cooperation of SqlUtil::cop_as() which allows human readable column name aliases.
cop_value(1), cop_value(True)
ends with ORA-00918: column ambiguously defined
because both values are interpreted as 1 in the resulting SQL.Example
hash<ColumnOperatorInfo> SqlUtil::cop_year | ( | auto | column | ) |
returns a ColumnOperatorInfo hash for the "year"
operator with the given argument
column | the column specification for the column (string name or dot notation for use in joins) |
hash<ColumnOperatorInfo> SqlUtil::cop_year_day | ( | auto | column | ) |
returns a ColumnOperatorInfo hash for the "year_day"
operator with the given argument
column | the column specification for the column (string name or dot notation for use in joins) |
hash<ColumnOperatorInfo> SqlUtil::cop_year_hour | ( | auto | column | ) |
returns a ColumnOperatorInfo hash for the "year_hour"
operator with the given argument
column | the column specification for the column (string name or dot notation for use in joins) |
hash<ColumnOperatorInfo> SqlUtil::cop_year_month | ( | auto | column | ) |
returns a ColumnOperatorInfo hash for the "year_month"
operator with the given argument
column | the column specification for the column (string name or dot notation for use in joins) |
hash<InsertOperatorInfo> SqlUtil::iop_seq | ( | string | arg | ) |
returns an InsertOperatorInfo hash for retrieving the value of the given sequence in insert queries
arg | the name of the sequence whose value should be inserted into the column |
hash<InsertOperatorInfo> SqlUtil::iop_seq_currval | ( | string | arg | ) |
returns an InsertOperatorInfo hash for retrieving the current value of the given sequence in insert queries
arg | the name of the sequence whose current value should be inserted into the column |
hash<string, hash<JoinOperatorInfo> > SqlUtil::join_inner | ( | AbstractTable | table, |
*string | alias, | ||
*hash | jcols, | ||
*hash | cond, | ||
*hash< auto > | opt | ||
) |
returns a hash for standard inner joins with the given arguments
table | the table to join with |
alias | the alias for table in the query |
jcols | the columns to use for the join, the keys will be columns in the source table and the values are columns in the table argument; if this argument is NOTHING, then if there is any foreign key in one table pointing to the primary key of the other table, then this information is automatically assumed as the join condition; a foreign constraint in the current table to the primary key in table will be used first if it exists |
cond | additional conditions for the join clause for the table argument; see Where Clauses for more information |
opt | optional join options (for example, to specify a partition for the join if supported) |
hash<string, hash<JoinOperatorInfo> > SqlUtil::join_inner | ( | string | ta, |
AbstractTable | table, | ||
*string | alias, | ||
*hash | jcols, | ||
*hash | cond, | ||
*hash< auto > | opt | ||
) |
returns a hash for standard inner joins with the given arguments for use when joining with a table other than the primary table
ta | the table name or alias of the other table to join with when not joining with the primary table |
table | the table to join with |
alias | the alias for table in the query |
jcols | the columns to use for the join, the keys will be columns in the source table and the values are columns in the table argument; if this argument is NOTHING, then if there is any foreign key in one table pointing to the primary key of the other table, then this information is automatically assumed as the join condition; a foreign constraint in the current table to the primary key in table will be used first if it exists |
cond | additional conditions for the join clause for the table argument; see Where Clauses for more information |
opt | optional join options (for example, to specify a partition for the join if supported) |
hash<string, hash<JoinOperatorInfo> > SqlUtil::join_inner | ( | string | ta, |
Table | table, | ||
*string | alias, | ||
*hash | jcols, | ||
*hash | cond, | ||
*hash< auto > | opt | ||
) |
returns a hash for standard inner joins with the given arguments for use when joining with a table other than the primary table
ta | the table name or alias of the other table to join with when not joining with the primary table |
table | the table to join with |
alias | the alias for table in the query |
jcols | the columns to use for the join, the keys will be columns in the source table and the values are columns in the table argument; if this argument is NOTHING, then if there is any foreign key in one table pointing to the primary key of the other table, then this information is automatically assumed as the join condition; a foreign constraint in the current table to the primary key in table will be used first if it exists |
cond | additional conditions for the join clause for the table argument; see Where Clauses for more information |
opt | optional join options (for example, to specify a partition for the join if supported) |
hash<string, hash<JoinOperatorInfo> > SqlUtil::join_inner | ( | string | table_name, |
*string | alias, | ||
*hash | jcols, | ||
*hash | cond, | ||
*hash< auto > | opt | ||
) |
returns a hash for standard inner joins with the given arguments
table_name | the table to join with; table will be subject to deferred resolution |
alias | the alias for table in the query |
jcols | the columns to use for the join, the keys will be columns in the source table and the values are columns in the table argument; if this argument is NOTHING, then if there is any foreign key in one table pointing to the primary key of the other table, then this information is automatically assumed as the join condition; a foreign constraint in the current table to the primary key in table will be used first if it exists |
cond | additional conditions for the join clause for the table argument; see Where Clauses for more information |
opt | optional join options (for example, to specify a partition for the join if supported) |
hash<string, hash<JoinOperatorInfo> > SqlUtil::join_inner | ( | Table | table, |
*string | alias, | ||
*hash | jcols, | ||
*hash | cond, | ||
*hash< auto > | opt | ||
) |
returns a hash for standard inner joins with the given arguments
table | the table to join with |
alias | the alias for table in the query |
jcols | the columns to use for the join, the keys will be columns in the source table and the values are columns in the table argument; if this argument is NOTHING, then if there is any foreign key in one table pointing to the primary key of the other table, then this information is automatically assumed as the join condition; a foreign constraint in the current table to the primary key in table will be used first if it exists |
cond | additional conditions for the join clause for the table argument; see Where Clauses for more information |
opt | optional join options (for example, to specify a partition for the join if supported) |
hash<string, hash<JoinOperatorInfo> > SqlUtil::join_inner_alias | ( | string | ta, |
string | table_name, | ||
*string | alias, | ||
*hash | jcols, | ||
*hash | cond, | ||
*hash< auto > | opt | ||
) |
returns a hash for standard inner joins with the given arguments for use when joining with a table other than the primary table
ta | the table name or alias of the other table to join with when not joining with the primary table |
table_name | the table to join with |
alias | the alias for table in the query |
jcols | the columns to use for the join, the keys will be columns in the source table and the values are columns in the table argument; if this argument is NOTHING, then if there is any foreign key in one table pointing to the primary key of the other table, then this information is automatically assumed as the join condition; a foreign constraint in the current table to the primary key in table will be used first if it exists |
cond | additional conditions for the join clause for the table argument; see Where Clauses for more information |
opt | optional join options (for example, to specify a partition for the join if supported) |
hash<string, hash<JoinOperatorInfo> > SqlUtil::join_left | ( | AbstractTable | table, |
*string | alias, | ||
*hash | jcols, | ||
*hash | cond, | ||
*hash< auto > | opt | ||
) |
returns a hash for left outer joins with the given arguments
table | the table to join with |
alias | the alias for table in the query |
jcols | the columns to use for the join, the keys will be columns in the source table and the values are columns in the table argument; if this argument is NOTHING, then if there is any foreign key in one table pointing to the primary key of the other table, then this information is automatically assumed as the join condition; a foreign constraint in the current table to the primary key in table will be used first if it exists |
cond | additional conditions for the join clause for the table argument; see Where Clauses for more information |
opt | optional join options (for example, to specify a partition for the join if supported) |
hash<string, hash<JoinOperatorInfo> > SqlUtil::join_left | ( | string | ta, |
AbstractTable | table, | ||
*string | alias, | ||
*hash | jcols, | ||
*hash | cond, | ||
*hash< auto > | opt | ||
) |
returns a hash for left outer joins with the given arguments for use when joining with a table other than the primary table
ta | the table name or alias of the other table to join with when not joining with the primary table |
table | the table to join with |
alias | the alias for table in the query |
jcols | the columns to use for the join, the keys will be columns in the source table and the values are columns in the table argument; if this argument is NOTHING, then if there is any foreign key in one table pointing to the primary key of the other table, then this information is automatically assumed as the join condition; a foreign constraint in the current table to the primary key in table will be used first if it exists |
cond | additional conditions for the join clause for the table argument; see Where Clauses for more information |
opt | optional join options (for example, to specify a partition for the join if supported) |
hash<string, hash<JoinOperatorInfo> > SqlUtil::join_left | ( | string | ta, |
Table | table, | ||
*string | alias, | ||
*hash | jcols, | ||
*hash | cond, | ||
*hash< auto > | opt | ||
) |
returns a hash for left outer joins with the given arguments for use when joining with a table other than the primary table
ta | the table name or alias of the other table to join with when not joining with the primary table |
table | the table to join with |
alias | the alias for table in the query |
jcols | the columns to use for the join, the keys will be columns in the source table and the values are columns in the table argument; if this argument is NOTHING, then if there is any foreign key in one table pointing to the primary key of the other table, then this information is automatically assumed as the join condition; a foreign constraint in the current table to the primary key in table will be used first if it exists |
cond | additional conditions for the join clause for the table argument; see Where Clauses for more information |
opt | optional join options (for example, to specify a partition for the join if supported) |
hash<string, hash<JoinOperatorInfo> > SqlUtil::join_left | ( | string | table_name, |
*string | alias, | ||
*hash | jcols, | ||
*hash | cond, | ||
*hash< auto > | opt | ||
) |
returns a hash for left outer joins with the given arguments
table_name | the table to join with |
alias | the alias for table in the query |
jcols | the columns to use for the join, the keys will be columns in the source table and the values are columns in the table argument; if this argument is NOTHING, then if there is any foreign key in one table pointing to the primary key of the other table, then this information is automatically assumed as the join condition; a foreign constraint in the current table to the primary key in table will be used first if it exists |
cond | additional conditions for the join clause for the table argument; see Where Clauses for more information |
opt | optional join options (for example, to specify a partition for the join if supported) |
hash<string, hash<JoinOperatorInfo> > SqlUtil::join_left | ( | Table | table, |
*string | alias, | ||
*hash | jcols, | ||
*hash | cond, | ||
*hash< auto > | opt | ||
) |
returns a hash for left outer joins with the given arguments
table | the table to join with |
alias | the alias for table in the query |
jcols | the columns to use for the join, the keys will be columns in the source table and the values are columns in the table argument; if this argument is NOTHING, then if there is any foreign key in one table pointing to the primary key of the other table, then this information is automatically assumed as the join condition; a foreign constraint in the current table to the primary key in table will be used first if it exists |
cond | additional conditions for the join clause for the table argument; see Where Clauses for more information |
opt | optional join options (for example, to specify a partition for the join if supported) |
hash<string, hash<JoinOperatorInfo> > SqlUtil::join_left_alias | ( | string | ta, |
string | table_name, | ||
*string | alias, | ||
*hash | jcols, | ||
*hash | cond, | ||
*hash< auto > | opt | ||
) |
returns a hash for left outer joins with the given arguments for use when joining with a table other than the primary table
ta | the table name or alias of the other table to join with when not joining with the primary table |
table_name | the table to join with |
alias | the alias for table in the query |
jcols | the columns to use for the join, the keys will be columns in the source table and the values are columns in the table argument; if this argument is NOTHING, then if there is any foreign key in one table pointing to the primary key of the other table, then this information is automatically assumed as the join condition; a foreign constraint in the current table to the primary key in table will be used first if it exists |
cond | additional conditions for the join clause for the table argument; see Where Clauses for more information |
opt | optional join options (for example, to specify a partition for the join if supported) |
hash<string, hash<JoinOperatorInfo> > SqlUtil::join_right | ( | AbstractTable | table, |
*string | alias, | ||
*hash | jcols, | ||
*hash | cond, | ||
*hash< auto > | opt | ||
) |
returns a hash for right outer joins with the given arguments
table | the table to join with |
alias | the alias for table in the query |
jcols | the columns to use for the join, the keys will be columns in the source table and the values are columns in the table argument; if this argument is NOTHING, then if there is any foreign key in one table pointing to the primary key of the other table, then this information is automatically assumed as the join condition; a foreign constraint in the current table to the primary key in table will be used first if it exists |
cond | additional conditions for the join clause for the table argument; see Where Clauses for more information |
opt | optional join options (for example, to specify a partition for the join if supported) |
hash<string, hash<JoinOperatorInfo> > SqlUtil::join_right | ( | string | ta, |
AbstractTable | table, | ||
*string | alias, | ||
*hash | jcols, | ||
*hash | cond, | ||
*hash< auto > | opt | ||
) |
returns a hash for right outer joins with the given arguments for use when joining with a table other than the primary table
ta | the table name or alias of the other table to join with when not joining with the primary table |
table | the table to join with |
alias | the alias for table in the query |
jcols | the columns to use for the join, the keys will be columns in the source table and the values are columns in the table argument; if this argument is NOTHING, then if there is any foreign key in one table pointing to the primary key of the other table, then this information is automatically assumed as the join condition; a foreign constraint in the current table to the primary key in table will be used first if it exists |
cond | additional conditions for the join clause for the table argument; see Where Clauses for more information |
opt | optional join options (for example, to specify a partition for the join if supported) |
hash<string, hash<JoinOperatorInfo> > SqlUtil::join_right | ( | string | ta, |
Table | table, | ||
*string | alias, | ||
*hash | jcols, | ||
*hash | cond, | ||
*hash< auto > | opt | ||
) |
returns a hash for right outer joins with the given arguments for use when joining with a table other than the primary table
ta | the table name or alias of the other table to join with when not joining with the primary table |
table | the table to join with |
alias | the alias for table in the query |
jcols | the columns to use for the join, the keys will be columns in the source table and the values are columns in the table argument; if this argument is NOTHING, then if there is any foreign key in one table pointing to the primary key of the other table, then this information is automatically assumed as the join condition; a foreign constraint in the current table to the primary key in table will be used first if it exists |
cond | additional conditions for the join clause for the table argument; see Where Clauses for more information |
opt | optional join options (for example, to specify a partition for the join if supported) |
hash<string, hash<JoinOperatorInfo> > SqlUtil::join_right | ( | string | table_name, |
*string | alias, | ||
*hash | jcols, | ||
*hash | cond, | ||
*hash< auto > | opt | ||
) |
returns a hash for right outer joins with the given arguments
table_name | the table to join with |
alias | the alias for table in the query |
jcols | the columns to use for the join, the keys will be columns in the source table and the values are columns in the table argument; if this argument is NOTHING, then if there is any foreign key in one table pointing to the primary key of the other table, then this information is automatically assumed as the join condition; a foreign constraint in the current table to the primary key in table will be used first if it exists |
cond | additional conditions for the join clause for the table argument; see Where Clauses for more information |
opt | optional join options (for example, to specify a partition for the join if supported) |
hash<string, hash<JoinOperatorInfo> > SqlUtil::join_right | ( | Table | table, |
*string | alias, | ||
*hash | jcols, | ||
*hash | cond, | ||
*hash< auto > | opt | ||
) |
returns a hash for right outer joins with the given arguments
table | the table to join with |
alias | the alias for table in the query |
jcols | the columns to use for the join, the keys will be columns in the source table and the values are columns in the table argument; if this argument is NOTHING, then if there is any foreign key in one table pointing to the primary key of the other table, then this information is automatically assumed as the join condition; a foreign constraint in the current table to the primary key in table will be used first if it exists |
cond | additional conditions for the join clause for the table argument; see Where Clauses for more information |
opt | optional join options (for example, to specify a partition for the join if supported) |
hash<string, hash<JoinOperatorInfo> > SqlUtil::join_right_alias | ( | string | ta, |
string | table_name, | ||
*string | alias, | ||
*hash | jcols, | ||
*hash | cond, | ||
*hash< auto > | opt | ||
) |
returns a hash for right outer joins with the given arguments for use when joining with a table other than the primary table
ta | the table name or alias of the other table to join with when not joining with the primary table |
table_name | the table to join with |
alias | the alias for table in the query |
jcols | the columns to use for the join, the keys will be columns in the source table and the values are columns in the table argument; if this argument is NOTHING, then if there is any foreign key in one table pointing to the primary key of the other table, then this information is automatically assumed as the join condition; a foreign constraint in the current table to the primary key in table will be used first if it exists |
cond | additional conditions for the join clause for the table argument; see Where Clauses for more information |
opt | optional join options (for example, to specify a partition for the join if supported) |
hash<ColumnOperatorInfo> SqlUtil::make_cop | ( | string | cop, |
auto | column, | ||
auto | arg | ||
) |
returns a ColumnOperatorInfo hash
cop | the column operator (one of SQL Column Operators) |
column | the column name |
arg | the argument to the operator |
hash<InsertOperatorInfo> SqlUtil::make_iop | ( | string | iop, |
auto | arg | ||
) |
returns an InsertOperatorInfo hash
iop | the value operator (one of SQL Insert Operators) |
arg | the argument to the operator |
hash<string, hash<JoinOperatorInfo> > SqlUtil::make_jop | ( | string | jop, |
AbstractTable | table, | ||
*string | alias, | ||
*hash | jcols, | ||
*hash | cond, | ||
*string | ta, | ||
*hash< auto > | opt | ||
) |
returns hash keyed with the table name assigned to a JoinOperatorInfo hash
hash<string, hash<JoinOperatorInfo> > SqlUtil::make_jop | ( | string | jop, |
string | table_name, | ||
*string | alias, | ||
*hash | jcols, | ||
*hash | cond, | ||
*string | ta, | ||
*hash< auto > | opt | ||
) |
returns a hash keyed with the table name assigned to a JoinOperatorInfo hash
This version is used for deferred table resolution at join time
hash<UpdateOperatorInfo> SqlUtil::make_uop | ( | string | uop, |
auto | arg, | ||
*hash< UpdateOperatorInfo > | nest | ||
) |
returns an UpdateOperatorInfo hash
uop | the update operator (one of SQL Update Operators) |
arg | the argument to the operator |
nest | any nested operation to the operator |
hash<OperatorInfo> SqlUtil::op_between | ( | auto | l, |
auto | r | ||
) |
returns an OperatorInfo hash for the "between"
operator with the given arguments, neither of which can be NULL or NOTHING; for use in where clauses
l | the lower bound for the "between" operator |
r | the upper bound for the "between" operator |
hash<OperatorInfo> SqlUtil::op_ceq | ( | string | arg | ) |
returns an OperatorInfo hash for the "="
operator with the given argument for use in where clauses when comparing the values of two columns
arg | the name of the column to compare against |
hash<OperatorInfo> SqlUtil::op_cge | ( | string | arg | ) |
returns an OperatorInfo hash for the ">="
operator with the given argument for use in where clauses when comparing the values of two columns
arg | the name of the column to compare against |
hash<OperatorInfo> SqlUtil::op_cgt | ( | string | arg | ) |
returns an OperatorInfo hash for the ">"
operator with the given argument for use in where clauses when comparing the values of two columns
arg | the name of the column to compare against |
hash<OperatorInfo> SqlUtil::op_cle | ( | string | arg | ) |
returns an OperatorInfo hash for the "<="
operator with the given argument for use in where clauses when comparing the values of two columns
arg | the name of the column to compare against |
hash<OperatorInfo> SqlUtil::op_clt | ( | string | arg | ) |
returns an OperatorInfo hash for the "<"
operator with the given argument for use in where clauses when comparing the values of two columns
arg | the name of the column to compare against |
hash<OperatorInfo> SqlUtil::op_cne | ( | string | arg | ) |
returns an OperatorInfo hash for the "!="
or "<>"
operator with the given argument for use in where clauses when comparing the values of two columns
arg | the name of the column to compare against |
hash<OperatorInfo> SqlUtil::op_eq | ( | auto | arg | ) |
returns an OperatorInfo hash for the "="
operator with the given argument for use in where clauses when comparing column values to immediate values
arg | the argument for the operator |
This operator also handles Qore::NULL as SQL NULL values expanding them into IS NULL
clause.
hash<OperatorInfo> SqlUtil::op_ge | ( | auto | arg | ) |
returns an OperatorInfo hash for the ">="
operator with the given argument for use in where clauses when comparing column values to immediate values
arg | the argument for the operator |
hash<OperatorInfo> SqlUtil::op_gt | ( | auto | arg | ) |
returns an OperatorInfo hash for the ">"
operator with the given argument for use in where clauses when comparing column values to immediate values
arg | the argument for the operator |
hash<OperatorInfo> SqlUtil::op_in | ( | ) |
returns an OperatorInfo hash for the "in"
operator with all arguments passed to the function; for use in where clauses
hash<OperatorInfo> SqlUtil::op_in | ( | list< auto > | args | ) |
returns an OperatorInfo hash for the "in"
operator with the given argument list as the first argument; for use in where clauses
args | a list of values for the "in" operator |
hash<OperatorInfo> SqlUtil::op_in_select | ( | AbstractTable | table, |
hash< auto > | select_hash | ||
) |
returns an OperatorInfo hash for the "in"
operator with a subquery as the argument; for use in where clauses
hash<OperatorInfo> SqlUtil::op_in_select | ( | string | table, |
hash< auto > | select_hash | ||
) |
returns an OperatorInfo hash for the "in"
operator with a subquery as the argument; for use in where clauses
hash<OperatorInfo> SqlUtil::op_in_select | ( | Table | table, |
hash< auto > | select_hash | ||
) |
returns an OperatorInfo hash for the "in"
operator with a subquery as the argument; for use in where clauses
hash<OperatorInfo> SqlUtil::op_le | ( | auto | arg | ) |
returns an OperatorInfo hash for the "<="
operator with the given argument for use in where clauses when comparing column values to immediate values
arg | the argument for the operator |
hash<OperatorInfo> SqlUtil::op_like | ( | string | str | ) |
returns an OperatorInfo hash for the "like"
operator with the given argument for use in where clauses
str | the argument for the operator |
hash<OperatorInfo> SqlUtil::op_lt | ( | auto | arg | ) |
returns an OperatorInfo hash for the "<"
operator with the given argument for use in where clauses when comparing column values to immediate values
arg | the argument for the operator |
hash<OperatorInfo> SqlUtil::op_ne | ( | auto | arg | ) |
returns an OperatorInfo hash for the "!="
or "<>"
operator with the given argument for use in where clauses when comparing column values to immediate values
arg | the argument for the operator |
This operator also handles Qore::NULL as SQL NULL values expanding them into IS NOT NULL
clause.
hash<OperatorInfo> SqlUtil::op_not | ( | hash | arg | ) |
returns an OperatorInfo hash for the "not"
operator; for use in where clauses
hash<OperatorInfo> SqlUtil::op_substr | ( | int | start, |
*int | count, | ||
string | text | ||
) |
returns an OperatorInfo hash for the "substr"
operator with the given arguments; for use in where clauses
start | position where the substring starts |
count | length of the substring in characters |
text | what substring should match |
hash<OperatorInfo> SqlUtil::op_substr | ( | int | start, |
string | text | ||
) |
returns an OperatorInfo hash for the "substr"
operator with the given arguments; for use in where clauses
start | position where the substring starts |
text | what substring should match |
hash<UpdateOperatorInfo> SqlUtil::uop_append | ( | string | arg, |
*hash< UpdateOperatorInfo > | nest | ||
) |
returns an UpdateOperatorInfo hash for the "append"
or concatenate operator with the given argument
arg | the text to prepend to the row values in the output column |
nest | any nested operation to the operator |
hash<UpdateOperatorInfo> SqlUtil::uop_divide | ( | auto | arg, |
*hash< UpdateOperatorInfo > | nest | ||
) |
returns an UpdateOperatorInfo hash for the "/"
operator with the given arguments
arg | numeric value to divide the column by |
nest | any nested operation to the operator |
hash<UpdateOperatorInfo> SqlUtil::uop_lower | ( | *hash< UpdateOperatorInfo > | nest | ) |
returns an UpdateOperatorInfo hash for the "lower"
operator with the given argument; returns a column value in lower case
nest | any nested operation to the operator |
hash<UpdateOperatorInfo> SqlUtil::uop_minus | ( | auto | arg, |
*hash< UpdateOperatorInfo > | nest | ||
) |
returns an UpdateOperatorInfo hash for the "-"
operator with the given arguments
arg | numeric value to subtract from the column |
nest | any nested operation to the operator |
hash<UpdateOperatorInfo> SqlUtil::uop_multiply | ( | auto | arg, |
*hash< UpdateOperatorInfo > | nest | ||
) |
returns an UpdateOperatorInfo hash for the "*"
operator with the given arguments
arg | numeric value to multiply the column by |
nest | any nested operation to the operator |
hash<UpdateOperatorInfo> SqlUtil::uop_plus | ( | auto | arg, |
*hash< UpdateOperatorInfo > | nest | ||
) |
returns an UpdateOperatorInfo hash for the "+"
operator with the given arguments
arg | numeric value to add to the column |
nest | any nested operation to the operator |
hash<UpdateOperatorInfo> SqlUtil::uop_prepend | ( | string | arg, |
*hash< UpdateOperatorInfo > | nest | ||
) |
returns an UpdateOperatorInfo hash for the "prepend"
operator with the given argument
arg | the text to prepend to the row values in the output column |
nest | any nested operation to the operator |
hash<UpdateOperatorInfo> SqlUtil::uop_seq | ( | string | seq | ) |
returns an UpdateOperatorInfo hash for the "seq"
operator with the given argument giving the sequence name whose value should be returned
seq | the name of the sequence whose value should be returned |
hash<UpdateOperatorInfo> SqlUtil::uop_seq_currval | ( | string | seq | ) |
returns an UpdateOperatorInfo hash for the "seq"
operator with the given argument giving the sequence name whose current value should be returned
seq | the name of the sequence whose current value should be returned |
hash<UpdateOperatorInfo> SqlUtil::uop_substr | ( | int | start, |
*int | count, | ||
*hash< UpdateOperatorInfo > | nest | ||
) |
returns an UpdateOperatorInfo hash for the "substr"
operator with the given arguments; returns a substring of a column value
start | position where the substring starts |
count | length of the substring in characters |
nest | any nested operation to the operator |
hash<UpdateOperatorInfo> SqlUtil::uop_upper | ( | *hash< UpdateOperatorInfo > | nest | ) |
returns an UpdateOperatorInfo hash for the "upper"
operator with the given argument; returns a column value in upper case
nest | any nested operation to the operator |
returns an OperatorInfo hash with a fake "_OR_"
column name; the list of arguments to the function is combined such that each hash in the list generates SQL expressions combined with "and" logic, and each of those clauses is combined with "or" logic; this is for use in where clauses
select * from schema.table where name = other_name and ((type = %v and validation flag is not null) or (expiration_date >= %v))
h1 | the first hash of expressions to combine with "or" logic |
h2 | the second hash of expressions to combine with "or" logic |
... | remaining expressions to combine with "or" logic |
"_OR_"
with a numeric prefix for uniqueness) for use in a where operation description hash for use in where clausesconst SqlUtil::COP_APPEND = "append" |
to append a string to a column on output
const SqlUtil::COP_AS = "as" |
to rename a column on output
const SqlUtil::COP_AVG = "avg" |
to return the average value
const SqlUtil::COP_CAST = "cast" |
to convert column value into another datatype
const SqlUtil::COP_COALESCE = "coalesce" |
to return the first non-null argument in the list
const SqlUtil::COP_COUNT = "count" |
to return the row count
const SqlUtil::COP_CUME_DIST = "cume_dist" |
const SqlUtil::COP_DENSE_RANK = "dense_rank" |
const SqlUtil::COP_DISTINCT = "distinct" |
to return distinct values
const SqlUtil::COP_DIVIDE = "divide" |
the SQL "divide"
operator
const SqlUtil::COP_FIRST_VALUE = "first_value" |
const SqlUtil::COP_LAST_VALUE = "last_value" |
const SqlUtil::COP_LENGTH = "length" |
const SqlUtil::COP_LOWER = "lower" |
to return column value in lower case
const SqlUtil::COP_MAX = "max" |
to return the maximum value
const SqlUtil::COP_MIN = "min" |
to return the minimum value
const SqlUtil::COP_MINUS = "minus" |
the SQL "minus"
operator
const SqlUtil::COP_MULTIPLY = "multiply" |
the SQL "multiply"
operator
const SqlUtil::COP_NTILE = "ntile" |
const SqlUtil::COP_OVER = "over" |
the SQL "over"
clause
const SqlUtil::COP_PERCENT_RANK = "percent_rank" |
const SqlUtil::COP_PLUS = "plus" |
the SQL "plus"
operator
const SqlUtil::COP_PREPEND = "prepend" |
to prepend a string to a column on output
const SqlUtil::COP_RANK = "rank" |
const SqlUtil::COP_ROW_NUMBER = "row_number" |
const SqlUtil::COP_SEQ = "seq" |
to return the next value of a sequence
const SqlUtil::COP_SEQ_CURRVAL = "seq_currval" |
to return the last value of a sequence issued in the same session
const SqlUtil::COP_SUBSTR = "substr" |
to extract a substring from a column
const SqlUtil::COP_SUM = "sum" |
to return the sum value
const SqlUtil::COP_TRUNC_DATE = "truncate_date" |
to return the date with truncated value
See also cop_trunc_date formats
const SqlUtil::COP_UPPER = "upper" |
to return column value in upper case
const SqlUtil::COP_VALUE = "value" |
to append a constant value (SQL Literal) to use as an output column value
const SqlUtil::COP_YEAR = "year" |
to return a date value with year information only
const SqlUtil::COP_YEAR_DAY = "year_day" |
to return a date value with year to day information
const SqlUtil::COP_YEAR_HOUR = "year_hour" |
to return a date value with year to hextern information
const SqlUtil::COP_YEAR_MONTH = "year_month" |
to return a date value with year to month information
const SqlUtil::DB_FUNCTIONS = "functions" |
Features constants.
Feature: functions
const SqlUtil::IOP_SEQ = "seq" |
for using the value of a sequence
const SqlUtil::IOP_SEQ_CURRVAL = "seq_currval" |
for using the last value of a sequence issued in the current session
const SqlUtil::JOP_INNER = "inner" |
for standard inner joins
const SqlUtil::JOP_LEFT = "left" |
for left outer joins
const SqlUtil::JOP_RIGHT = "right" |
for right outer joins
const SqlUtil::OP_BETWEEN = "between" |
the SQL "between"
operator for use in Where Clauses
const SqlUtil::OP_CEQ = "C=" |
the SQL equals operator (=) for use in Where Clauses
const SqlUtil::OP_CGE = "C>=" |
the SQL greater than or equals operator (>=) for use in Where Clauses
const SqlUtil::OP_CGT = "C>" |
the SQL greater than operator (>) for use in Where Clauses
const SqlUtil::OP_CLE = "C<=" |
the SQL less than or equals (<=) operator for use in Where Clauses
const SqlUtil::OP_CLT = "C<" |
the SQL less than (<) operator for use in Where Clauses when comparing two columns
const SqlUtil::OP_CNE = "C!=" |
the SQL not equals operator (!= or <>) for use in Where Clauses
const SqlUtil::OP_EQ = "=" |
the SQL equals operator (=) for use in Where Clauses
const SqlUtil::OP_GE = ">=" |
the SQL greater than or equals operator (>=) for use in Where Clauses
const SqlUtil::OP_GT = ">" |
the SQL greater than operator (>) for use in Where Clauses
const SqlUtil::OP_IN = "in" |
the SQL "in"
operator for use in Where Clauses
const SqlUtil::OP_IN_SELECT = "in_select" |
the SQL "in"
operator with a select query for use in Where Clauses
const SqlUtil::OP_LE = "<=" |
the SQL less than or equals (<=) operator for use in Where Clauses
const SqlUtil::OP_LIKE = "like" |
the SQL "like" operator for use in Where Clauses
const SqlUtil::OP_LT = "<" |
the SQL less than (<) operator for use in Where Clauses
const SqlUtil::OP_NE = "!=" |
the SQL not equals operator (!= or <>) for use in Where Clauses
const SqlUtil::OP_NOT = "not" |
the SQL "not"
operator for use in Where Clauses
const SqlUtil::OP_OR = "or" |
to combine SQL expressions with "or"
for use in Where Clauses
const SqlUtil::OP_SUBSTR = "substr" |
the SQL "substr"
operator for use in Where Clauses