Skip to content

Comparison and Logical Operators

darvid edited this page Dec 30, 2012 · 3 revisions

Trine currently supports the following logical operators in where and merge-from mappings:

Operator Usage Example Description
OR Same column only col: [value1, value2, value3].* All values given in a sequence (array, list, whatever you want to call it) are reduced using the SQL OR operator.
NOT col: !value
LIKE name: Glyph of % Currently, Trine only checks for the existence of the % character - _ or other complex uses of LIKE are not supported at present.
RLIKE, REGEX name: "/^[A-Za-z]+ Ametrine/" Any strings beginning and ending with a forward slash (/) are stripped and used as patterns in RLIKE comparisons.

* multi-column support coming soon

Special Operators and Syntax

Syntax Description Supported Tables
name: "Deathbringer's Will^" Appending a caret symbol (^) to item names indicates that you only want to retrieve the item with the highest ItemLevel. Basically shorthand for using something like {name: xxx, ItemLevel: 284} to filter heroics from non-heroics. item_template