All Classes Namespaces Functions Variables Groups Pages
SQL Operator Functions

## 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...

## Detailed Description

These are the operators that can be used in where clauses; see Where Clauses for more information:

- op_between(): for the `"between"` operator
- op_in(): for the `"in"` operator
- op_like(): for the `"like"` operator
- op_ge(): for the `">="` operator when comparing column values to immediate values
- op_gt(): for the `">"` operator when comparing column values to immediate values
- op_le(): for the `"<="` operator when comparing column values to immediate values
- op_lt(): for the `"<"` operator when comparing column values to immediate values
- op_ne(): for the `"!="` or `"<>"` operator when comparing column values to immediate values
- op_eq(): for the `"="` operator when comparing column values to immediate values
- op_not(): for negating other operators
- op_cge(): for the `">="` operator when comparing the values of two columns
- op_cgt(): for the `">"` operator when comparing the values of two columns
- op_cle(): for the `"<="` operator when comparing the values of two columns
- op_clt(): for the `"<"` operator when comparingthe values of two columns
- op_cne(): for the `"!="` or `"<>"` operator when comparing the values of two columns
- op_ceq(): for the `"="` operator when comparing the values of two columns

## Function Documentation

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

Example:
  my *list $rows = $table.selectRows(("where": ("name": op_between("US", "UX"))));

Parameters

  l | the lower bound for the `"between"` operator
  r | the upper bound for the `"between"` operator

Returns
  a where operation description hash for use in where clauses

Exceptions

  BETWEEN-ERROR | one or both of the required arguments are NULL or NOTHING

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

Example:
  my *list $rows = $table.selectRows(("where": ("name": op_ceq("other_name"))));

Parameters

  arg | the name of the column to compare against

Returns
  a where operation description hash for use in where clauses

See Also
  op_eq() for a function to be used when comparing a column against an immediate value

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

Example:
  my *list $rows = $table.selectRows(("where": ("name": op_cge("other_name"))));

Parameters

  arg | the name of the column to compare against

Returns
  a where operation description hash for use in where clauses

See Also
  op_ge() for a function to be used when comparing a column against an immediate value

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

Example:
  my *list $rows = $table.selectRows(("where": ("name": op_cgt("other_name"))));

Parameters

  arg | the name of the column to compare against

Returns
  a where operation description hash for use in where clauses

See Also
  op_gt() for a function to be used when comparing a column against an immediate value

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

Example:
  my *list $rows = $table.selectRows(("where": ("name": op_cle("other_name"))));

Parameters

  arg | the name of the column to compare against

Returns
  a where operation description hash for use in where clauses

See Also
  op_le() for a function to be used when comparing a column against an immediate value

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

Example:
  my *list $rows = $table.selectRows(("where": ("name": op_clt("other_name"))));

Parameters

  arg | the name of the column to compare against

Returns
  a where operation description hash for use in where clauses

See Also
  op_lt() for a function to be used when comparing a column against an immediate value

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

Example:
  my *list $rows = $table.selectRows(("where": ("name": op_cne("other_name"))));

Parameters

  arg | the name of the column to compare against

Returns
  a where operation description hash for use in where clauses

See Also
  op_ne() for a function to be used when comparing a column against an immediate value

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

Example:
  my *list $rows = $table.selectRows(("where": ("name": op_eq("Smith"))));

Parameters

  arg | the argument for the operator

Returns
  a where operation description hash for use in where clauses

See Also
  op_ceq() for a function to be used when comparing two column values

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

Example:
  my *list $rows = $table.selectRows(("where": ("name": op_ge("Apple"))));

Parameters

  arg | the argument for the operator

Returns
  a where operation description hash for use in where clauses

See Also
  op_cge() for a function to be used when comparing two column values

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

Example:
  my *list $rows = $table.selectRows(("where": ("name": op_gt("Apple"))));

Parameters

  arg | the argument for the operator

Returns
  a where operation description hash for use in where clauses

See Also
  op_cgt() for a function to be used when comparing two column values

hash SqlUtil::op_in | ( |  | ) |

returns a hash for the `"in"` operator with all arguments passed to the function; for use in where clauses

Example:
  my *list $rows = $table.selectRows(("where": ("name": op_in(200, 300, 500, 9))));

Returns
  a where operation description hash for use in where clauses

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

Example:
  my *list $rows = $table.selectRows(("where": ("name": op_in($idlist))));

Parameters

  args | a list of values for the `"in"` operator

Returns
  a where operation description hash for use in where clauses

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

Example:
  my *list $rows = $table.selectRows(("where": ("name": op_le("Zebra"))));

Parameters

  arg | the argument for the operator

Returns
  a where operation description hash for use in where clauses

See Also
  op_cle() for a function to be used when comparing two column values

hash SqlUtil::op_like | ( | string | str | ) |

returns a hash for the `"like"` operator with the given argument for use in where clauses

Example:
  my *list $rows = $table.selectRows(("where": ("name": op_like("%smith%"))));

Parameters

  str | the argument for the operator

Returns
  a where operation description hash for use in where clauses

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

Example:
  my *list $rows = $table.selectRows(("where": ("name": op_lt("Zebra"))));

Parameters

  arg | the argument for the operator

Returns
  a where operation description hash for use in where clauses

See Also
  op_clt() for a function to be used when comparing two column values

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

Example:
  my *list $rows = $table.selectRows(("where": ("name": op_ne("Smith"))));

Parameters

  arg | the argument for the operator

Returns
  a where operation description hash for use in where clauses

See Also
  op_cne() for a function to be used when comparing two column values

hash SqlUtil::op_not | ( | hash | arg | ) |

returns a hash for the `"not"` operator; for use in where clauses

Example:
  my *list $rows = $table.selectRows(("where": ("name": opt_not(op_in(200, 300, 500, 9))))_;

Returns
  a where operation description hash for use in where clauses