fandyvon / activejdbc

Automatically exported from code.google.com/p/activejdbc
0 stars 0 forks source link

Unwrap String[] in the where() method as a list of comma-separated list replacing one place holder #21

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago

Person.where("name in (?) and age > ?", names_array, 40);

Original issue reported on code.google.com by ipolevoy@gmail.com on 8 Sep 2010 at 5:36

GoogleCodeExporter commented 9 years ago
this is a non-trivial item, see:
http://stackoverflow.com/questions/178479/alternatives-for-java-sql-preparedstat
ement-in-clause-issue

Original comment by ipolevoy@gmail.com on 8 Sep 2010 at 9:43

GoogleCodeExporter commented 9 years ago

Original comment by ipolevoy@gmail.com on 8 Sep 2010 at 9:43

GoogleCodeExporter commented 9 years ago
What would be a good workaround for this issue? Currently i create the IN() SQL 
clause myself, but the implementation lacks attribute escaping.

Original comment by mikk.man...@gmail.com on 30 Jan 2013 at 11:46

GoogleCodeExporter commented 9 years ago
Please, see:

http://code.google.com/p/activejdbc/wiki/FAQ?ts=1359571394&updated=FAQ#Does_Acti
veJDBC_support_SQL_IN_statement?

Original comment by i...@polevoy.org on 30 Jan 2013 at 6:45