Qore SqlUtil Module Reference
1.5
|
Functions | |
hash< OperatorInfo > | SqlUtil::make_op (string op, auto arg) |
returns an OperatorInfo hash | |
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 More... | |
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 More... | |
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 More... | |
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 More... | |
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 More... | |
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 More... | |
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 More... | |
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 More... | |
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 More... | |
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 More... | |
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 More... | |
hash< OperatorInfo > | SqlUtil::op_in (list 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 > | 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 More... | |
hash< OperatorInfo > | SqlUtil::op_like (string str) |
returns an OperatorInfo hash for the "like" operator with the given argument for use in where clauses More... | |
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 More... | |
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 More... | |
hash< OperatorInfo > | SqlUtil::op_not (hash arg) |
returns an OperatorInfo hash for the "not" operator; for use in where clauses More... | |
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 More... | |
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 More... | |
hash< string, hash< OperatorInfo > > | SqlUtil::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... | |
These are the operators that can be used in where clauses; see Where Clauses for more information:
"between"
operator"in"
operator"like"
operator"substr"
operator">="
operator when comparing column values to immediate values">"
operator when comparing column values to immediate values"<="
operator when comparing column values to immediate values"<"
operator when comparing column values to immediate values"!="
or "<>"
operator when comparing column values to immediate values"="
operator when comparing column values to immediate values">="
operator when comparing the values of two columns">"
operator when comparing the values of two columns"<="
operator when comparing the values of two columns"<"
operator when comparingthe values of two columns"!="
or "<>"
operator when comparing the values of two columns"="
operator when comparing the values of two columns"or"
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 | 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_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 |
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 clauses