mysema/querydsl — pull request #655 by pmenke-de (2014-02-05 09:19:51+00:00)
Title: Proposal for multi-column IN clause support

As we need a feature to create queries as described in http://stackoverflow.com/questions/17735995/muliticolumn-in-clause-in-query-dsl i implemented it with this branch. I'm not that deep in querydsl matter to know if this will cause unwanted side effects.

This will allow to create queries like :
```
CREATE TABLE TEST_TABLE (
ID_1 INTEGER,
ID_2 INTEGER,
VALUE TEXT,
PRIMARY KEY(ID_1, ID_2)
);

SELECT * FROM TEST_TABLE WHERE (ID_1, ID_2) IN (1,2),(2,3)
```
To achieve that query i use the following java code:
```
QTestTable TEST_TABLE = QTestTable.testTable;
SimpleExpression[] inFields = {TEST_TABLE.id1, TEST_TABLE.id2};
QTuple qTuple = new QTuple(inFields);
SimpleExpression inExpression = Expressions.list(inFields);
Set keys = Sets.newHashSet(
qTuple.newInstance(1,2),
qTuple.newInstance(2,3)
);
SQLQuery sqlQuery = newSqlQuery().from(TEST_TABLE).where(inExpression.in(keys));
```
It will give a great performance improvement as it avoids queries with high serialization and parsing effort, like
```
SELECT * FROM TEST_TABLE WHERE
(ID_1 = 1 AND ID_2 = 2) OR
(ID_1 = 2 AND ID_2 = 3) -- ... a thousand more times
```