On 6/17/2016 8:21 AM, Rapin Patrick wrote:
Find a generic way to retrieve column names and table name (and then column
types with above pragma) in a arbitrary single SQL statement for all
placeholder values.
Examples:
"INSERT INTO t1(col1, col2) VALUES(2, ?); ยป => (t1, col2)
"UPDATE t2 SET col1=? WHERE col2=? " => (t2, col1) and (t2, col2)
"SELECT * from t1 WHERE col2=?" => (t1, col2)
select * from t1 where col1 = ?1+?2 and col2=?1-?2;
What should be the expected output of your hypothetical generic way for
a statement like this?
You seem to assume a one-to-one correspondence between columns and
placeholders. This assumption doesn't generally hold.
--
Igor Tandetnik
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users