Skip to content
Snippets Groups Projects
Commit 8997657a authored by Nikita Pettik's avatar Nikita Pettik
Browse files

sql: return result-set type via IProto

Lets evaluate an expression type during processing of expression's AST
and code generation. It allows to calculate resulting columns data types
and export them as IProto meta alongside with columns' names.
Also, correct types are also returned for binding parameters as well.

Note that NULL literal has type "BOOLEAN". It was made on purpose -
different DBs interpret NULL's type in different ways: some of them
use INT; others - VARCHAR; still others - UNKNOWN. We've decided that
NULL is rather of type "BOOLEAN", since NULL is kind if subset of
"BOOLEAN" values: any comparison with NULL results in neither TRUE nor
FALSE, but in NULL.

Part of #2620
parent 53b0ef87
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment