Add support for lists in queries