Tarantool development patches archive
 help / color / mirror / Atom feed
* [tarantool-patches] [PATCH 0/3] Rework VIEW processing
@ 2018-04-03 14:54 Nikita Pettik
  2018-04-03 14:54 ` [tarantool-patches] [PATCH 1/3] sql: remove usless #ifdef directives Nikita Pettik
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Nikita Pettik @ 2018-04-03 14:54 UTC (permalink / raw)
  To: tarantool-patches; +Cc: v.shpilevoy, Nikita Pettik

Branch: https://github.com/tarantool/tarantool/tree/np/gh-3300-parse-load-view
Issue: https://github.com/tarantool/tarantool/issues/3300

First patch of the series is about refactoring: as far as VIEWs
are always enabled, there is no need in OMIT_VIEW directive.
Alongside with this macros, several others are also removed.

Second patch adds to space format VIEW column's aliases:
'CREATE VIEW v(a, b) AS SELECT ...' -- in this case, space format will
consist from two named fields 'a' and 'b'.

Finally, last patch introduces simple lever to fetch SELECT from
'CREATE VIEW AS SELECT ...' statement and load it into internal struct.
Also, routine which is connected with views have been refactored,
in order to use this facility, instead of relying on struct Table.
Alongside with this change, fix codestyle and added doxygen style comments.

Nikita Pettik (3):
  sql: remove usless #ifdef directives
  sql: add view column aliases to space format
  sql: load SELECT from 'CREATE VIEW ...' string

 src/box/sql.c              |  22 +-
 src/box/sql/CMakeLists.txt |   1 -
 src/box/sql/alter.c        |   2 -
 src/box/sql/attach.c       |   6 -
 src/box/sql/build.c        | 231 ++++++++++--------
 src/box/sql/complete.c     | 333 --------------------------
 src/box/sql/delete.c       |  20 +-
 src/box/sql/expr.c         |   5 +-
 src/box/sql/fkey.c         |   8 -
 src/box/sql/insert.c       |  17 +-
 src/box/sql/parse.c        | 570 +++++++++++++++++++++++----------------------
 src/box/sql/parse.y        |  13 +-
 src/box/sql/pragma.c       |  10 +-
 src/box/sql/pragma.h       |   8 -
 src/box/sql/resolve.c      |   3 -
 src/box/sql/select.c       | 180 +++++++-------
 src/box/sql/sqliteInt.h    |  56 ++---
 src/box/sql/tarantoolInt.h |   2 +-
 src/box/sql/tokenize.c     |  30 ++-
 src/box/sql/treeview.c     |   2 -
 src/box/sql/trigger.c      |   3 -
 src/box/sql/update.c       |  17 +-
 src/box/sql/vdbe.c         |   5 -
 src/box/sql/vdbe.h         |   2 -
 src/box/sql/vdbeInt.h      |   4 -
 src/box/sql/vdbeaux.c      |   4 -
 test/sql-tap/view.test.lua |  26 ++-
 27 files changed, 593 insertions(+), 987 deletions(-)
 delete mode 100644 src/box/sql/complete.c

-- 
2.15.1

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-04-03 17:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-03 14:54 [tarantool-patches] [PATCH 0/3] Rework VIEW processing Nikita Pettik
2018-04-03 14:54 ` [tarantool-patches] [PATCH 1/3] sql: remove usless #ifdef directives Nikita Pettik
2018-04-03 17:23   ` [tarantool-patches] " Vladislav Shpilevoy
2018-04-03 14:54 ` [tarantool-patches] [PATCH 2/3] sql: add view column aliases to space format Nikita Pettik
2018-04-03 14:54 ` [tarantool-patches] [PATCH 3/3] sql: load SELECT from 'CREATE VIEW ...' string Nikita Pettik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox