[tarantool-patches] Re: [PATCH 5/6] sql: return result-set type via IProto
v.shpilevoy at tarantool.org
Thu Oct 18 00:45:34 MSK 2018
>> 2. Why do you set types as names?
> I thought it is OK: array containing column names also can fit their types.
> pColName = &(p->aColName[idx + var * p->nResColumn]);
Sorry, my fault. Function name confused me. Now I see that
it takes a parameter of what attribute to set.
>> 4. Why is the type 'UNKNOWN' if the value is integer?
> It is how bindings work.
No, bindings as an API have nothing to do with types.
It is Vdbe's issue, into which the values are inserted,
and it should detect their type. It is not affinity
issue, but Vdbe changing after its compilation. Anyway,
a user placed a number as a parameter and got UNKNOWN -
it is extra weird.
By the way, '? as <column_name>' works ok - the result
set contains real name instead of '?'. I think, it should
work for types too.
If you want to do it as a separate ticket, I do not mind,
but please consult Kirill to be sure.
More information about the Tarantool-patches