Qore SqlUtil Module Reference
1.3
|
Functions | |
hash | SqlUtil::make_op (string op, any arg) |
returns a hash with op and arg keys | |
hash | SqlUtil::op_between (any l, any r) |
returns a hash for the "between" operator with the given arguments, neither of which can be NULL or NOTHING; for use in where clauses More... | |
hash | SqlUtil::op_ceq (string arg) |
returns a hash for the "=" operator with the given argument for use in where clauses when comparing the values of two columns More... | |
hash | SqlUtil::op_cge (string arg) |
returns a hash for the ">=" operator with the given argument for use in where clauses when comparing the values of two columns More... | |
hash | SqlUtil::op_cgt (string arg) |
returns a hash for the ">" operator with the given argument for use in where clauses when comparing the values of two columns More... | |
hash | SqlUtil::op_cle (string arg) |
returns a hash for the "<=" operator with the given argument for use in where clauses when comparing the values of two columns More... | |
hash | SqlUtil::op_clt (string arg) |
returns a hash for the "<" operator with the given argument for use in where clauses when comparing the values of two columns More... | |
hash | SqlUtil::op_cne (string arg) |
returns a hash for the "!=" or "<>" operator with the given argument for use in where clauses when comparing the values of two columns More... | |
hash | SqlUtil::op_eq (any arg) |
returns a hash for the "=" operator with the given argument for use in where clauses when comparing column values to immediate values More... | |
hash | SqlUtil::op_ge (any arg) |
returns a hash for the ">=" operator with the given argument for use in where clauses when comparing column values to immediate values More... | |
hash | SqlUtil::op_gt (any arg) |
returns a hash for the ">" operator with the given argument for use in where clauses when comparing column values to immediate values More... | |
hash | SqlUtil::op_in () |
returns a hash for the "in" operator with all arguments passed to the function; for use in where clauses More... | |
hash | SqlUtil::op_in (list args) |
returns a hash for the "in" operator with the given argument list as the first argument; for use in where clauses More... | |
hash | SqlUtil::op_le (any arg) |
returns a hash for the "<=" operator with the given argument for use in where clauses when comparing column values to immediate values More... | |
hash | SqlUtil::op_like (string str) |
returns a hash for the "like" operator with the given argument for use in where clauses More... | |
hash | SqlUtil::op_lt (any arg) |
returns a hash for the "<" operator with the given argument for use in where clauses when comparing column values to immediate values More... | |
hash | SqlUtil::op_ne (any arg) |
returns a hash for the "!=" or "<>" operator with the given argument for use in where clauses when comparing column values to immediate values More... | |
hash | SqlUtil::op_not (hash arg) |
returns a hash for the "not" operator; for use in where clauses More... | |
hash | SqlUtil::op_substr (int start, *int count, string text) |
returns a hash for the "substr" operator with the given arguments; for use in where clauses More... | |
hash | SqlUtil::op_substr (int start, string text) |
returns a hash for the "substr" operator with the given arguments; for use in where clauses More... | |
hash | SqlUtil::wop_or (hash h1, hash h2) |
returns a 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 SqlUtil::op_between | ( | any | l, |
any | r | ||
) |
returns a 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 |
returns a 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 |
returns a 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 |
returns a 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 |
returns a 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 |
returns a 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 |
returns a 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 SqlUtil::op_eq | ( | any | arg | ) |
returns a 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 SqlUtil::op_ge | ( | any | arg | ) |
returns a 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 SqlUtil::op_gt | ( | any | arg | ) |
returns a 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 SqlUtil::op_in | ( | ) |
returns a hash for the "in"
operator with all arguments passed to the function; for use in where clauses
returns a 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 SqlUtil::op_le | ( | any | arg | ) |
returns a 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 |
returns a hash for the "like"
operator with the given argument for use in where clauses
str | the argument for the operator |
hash SqlUtil::op_lt | ( | any | arg | ) |
returns a 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 SqlUtil::op_ne | ( | any | arg | ) |
returns a 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.
returns a hash for the "not"
operator; for use in where clauses
returns a 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 |
returns a 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 a 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 table where name != other_name and ((type != 'C' and validation flag is not null) or (expiration_date >= %v))
h1 | the 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