[line 168]
Creates SQL strings that check if a set of fields equals to one tuple of the passed list of value tuples.
This class generates SQL snippets that check if one or more fields have a value constellation that equals to one of the given constant value constellations. It is introduced to allow specifying a list of values (or value tuples), for example a list of IDs to return exactly the rows where the specified field match one of the given IDs. If a table's primary key consists of more than one field, one had to write the "... ) OR (`key1`='IDn' AND `key2`='IDm') OR (`key1`='IDn+1' AND `key2`='IDm+1') OR (..." strings by hand which are generated if more than one field is given. I know, this is rather complicated, but writing this every time you need it is even more annoying than this class. Note that escaping and quoting is done automatically - you can pass whatever data you want as field names, table names or values without risking SQL injection (provided there are no bugs...). If you want to check a single field, pass the field name in the constructor as string and pass the values as one-dimensional array. If you want to check multiple fields, pass the field names as one-dimensional array and the values as an array of arrays, where the child array's element counts match the number of fields. The first value of a child array is compared to the first field, the second to the second and so on. This look like this:
will print (`myTable`.`field` IN ('a', 'b', 'c')). Note: You can also pass a single field as array with one component and the values as array of arrays with one component. This leads to the same result as the second example. If there are not enough or too many values in a second-level array, this leads to a GAL_EExpression.