Re: [sqlite] sqlite3_column_origin_name for INSERT and UPDATE

2016-06-17 Thread Rapin Patrick
2016-06-17 18:26 GMT+02:00 Igor Tandetnik : > > 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 >

Re: [sqlite] sqlite3_column_origin_name for INSERT and UPDATE

2016-06-17 Thread Rapin Patrick
2016-06-17 18:24 GMT+02:00 James K. Lowden : > > You are encoding type information in the name. If you move the type > information into the data, SQLite can manage the unit dimension. You > could use a CHECK constraint to require that speed was in m/s, or a > trigger

Re: [sqlite] sqlite3_column_origin_name for INSERT and UPDATE

2016-06-17 Thread Rapin Patrick
> Le 17 juin 2016 à 13:35, Hick Gunter a écrit : > > Does > > .pragma table_info(); > > not solve your problem? > I indeed need PRAGMA table_info(), to get type names from column names. Let my rephrase my question: Find a generic way to retrieve column names and table

[sqlite] sqlite3_column_origin_name for INSERT and UPDATE

2016-06-17 Thread Rapin Patrick
Hello, I am using function sqlite3_column_origin_name and friends in my SQLite3 C++ wrapper class to get table and column names in SELECT statements. I would like to have the same feature for INSERT and UPDATE statements: that is, find the table name and column names when writing to the