Thank you for refering me to
SQL::Abstract, this is where the
WHERE clauses are documented. Furthermore, the suggested
NOT IN works well, great!
Regarding the two cases listed in my question, I found that
- The proper code is $schema->resultset('my_table')->search({ id => {-in => [12,13,17]} }). Note that the r.h.s. of -in is an arrayref, not a string as I guessed initially.
- NOT is not yet possible.
On SQL::Abstract, it is explained that there is not (yet) any explicit support for SQL compound logic statements like "AND NOT".