[patches] [PATCH 0/7] iproto: send SQL column meta on SELECT
Vladislav Shpilevoy
v.shpilevoy at tarantool.org
Wed Feb 28 22:36:47 MSK 2018
Branch: http://github.com/tarantool/tarantool/tree/gh-2620-return-sql-meta
Issue: https://github.com/tarantool/tarantool/issues/2620
The patch removes SQLite column meta generation to replace it with
more fast, detailed and compact implementation.
An original column meta contained only a column name, an alias and
a column's table name - it is not enought for a JDBC driver, which
needs such info like 'belonging to a primary index',
'autoincrement', 'nullability'. Moreover, SQLite stores each name,
listed above, in a separate struct Mem, that is very superfluous
for names storing.
Instead of struct Mem, a new struct sql_column_meta is introduced,
that is filled with all necessary meta fields and encoded to
IPROTO response on SELECT.
Vladislav Shpilevoy (7):
collation: introduce coll_is_case_sensitive function
sql: remove SQLITE_ENABLE_COLUMN_METADATA and _OMIT_DECLTYPE
sql: add missing header guard to sqliteLimit.h
iproto: move IPROTO_METADATA fields to a new enum, start from 0
sql: store column meta in a special structure instead of Mem
iproto: send SQL column meta on SELECT
sql: get rid of sqlite3_column_[origin_]name, columnName
src/box/coll.c | 7 ++
src/box/coll.h | 8 ++
src/box/execute.c | 127 +++++++++++++++++++++++++++-----
src/box/iproto_constants.c | 3 +-
src/box/iproto_constants.h | 33 ++++++++-
src/box/lua/net_box.lua | 29 +++++++-
src/box/lua/sql.c | 7 +-
src/box/sql/delete.c | 4 +-
src/box/sql/insert.c | 4 +-
src/box/sql/legacy.c | 11 +--
src/box/sql/pragma.c | 8 +-
src/box/sql/prepare.c | 6 +-
src/box/sql/select.c | 179 +++++++++++++++------------------------------
src/box/sql/sqlite3.h | 138 +++-------------------------------
src/box/sql/sqliteInt.h | 44 +++++++++++
src/box/sql/sqliteLimit.h | 4 +
src/box/sql/update.c | 4 +-
src/box/sql/vdbe.h | 24 +-----
src/box/sql/vdbeInt.h | 3 +-
src/box/sql/vdbeapi.c | 125 ++-----------------------------
src/box/sql/vdbeaux.c | 114 +++++++++++++++++++----------
test/sql/iproto.result | 59 +++++++++++++--
test/sql/iproto.test.lua | 9 +++
23 files changed, 469 insertions(+), 481 deletions(-)
--
2.14.3 (Apple Git-98)
More information about the Tarantool-patches
mailing list