Christian Werner <[EMAIL PROTECTED]> writes:

>> >> Further I wonder what's behind the decision to use
>> >> PRAGMA short_column_names = off
>> >> PRAGMA full_column_names = on
>> >>
>> >> When using short_column_names instead (which is default),
>> >> behaviour seems closer to standard Database SQL engines.
>> >>
>> >> Could you ellaborate on this decision?
>> >
>> > To be able to implement SQLColumnAttribute(...SQL_DESC_TABLE_NAME...)
>> > efficiently.
>> 
>> I see, I believe you mean SQLColAttributes(...).
>> 
>> Wouldn't it be a good idea to limit the sqlite state change to this
>> purpose only?
>
> No idea how to achieve this. The table names of the columns are
> required. The best solution would be to have some SQLite API
> functions to get 1. column name as defined in the CREATE TABLE,
> 2. column's table name, and 3. column's alias. The current
> solution using full_column_names stems from the SQLite 2
> driver and was then the most effective way for implementing
> SQLColAttribute() and SQLColAttributes().

How about just setting
PRAGMA short_column_names = off
PRAGMA full_column_names = on
withing SQLColAttribute() and SQLColAttributes() and then, before
returning from the function(s), setting it back to 
PRAGMA short_column_names = on
PRAGMA full_column_names = off

Jarl

-- 
Jarl Friis
Softace ApS
Omøgade 8, 2.sal
2100 København Ø.
Denmark
Phone:  +45 26 13 20 90
E-mail: [EMAIL PROTECTED]
LinkedIn: https://www.linkedin.com/in/jarlfriis

Reply via email to