Tarantool 1.8 | Tarantool
Документация на русском языке
поддерживается сообществом

Tarantool 1.8

Release: v. 1.8.0

Версия 1.8.1

Release type: alpha. Release date: 2017-05-17. Tag: 1.8.1. Release: https://groups.google.com/forum/#!msg/tarantool-ru/XYaoqJpc544/mSvKrYwNAgAJ or v. 1.8.1.

This is an alpha release which delivers support for a substantial subset of the ISO/IEC 9075:2011 SQL standard, including joins, subqueries and views. SQL is a major feature of the 1.8 release series, in which we plan to add support for ODBC and JDBC connectors, SQL triggers, prepared statements, security and roles, and generally ensure SQL is a first class query language in Tarantool.

Изменения или добавления функциональности:

  • A new function box.sql.execute() (later changed to box.execute in Tarantool 2.1) was added to query Tarantool databases using SQL statements, e.g.:

    tarantool> box.sql.execute([[SELECT * FROM _schema]]);
    
  • SQL and Lua are fully interoperable.

  • New meta-commands introduced to Tarantool’s console.

    You can now set input language to either SQL or Lua, e.g.:

    tarantool> \set language sql
    tarantool> SELECT * FROM _schema
    tarantool> \set language lua
    tarantool> print("Hello, world!")
    
  • Most SQL statements are supported:

    • CREATE/DROP TABLE/INDEX/VIEW

      tarantool> CREATE TABLE table1 (column1 INTEGER PRIMARY KEY, column2 VARCHAR(100));
      
    • INSERT/UPDATE/DELETE statements e.g.:

      tarantool> INSERT INTO table1 VALUES (1, 'A');
      ...
      tarantool> UPDATE table1 SET column2 = 'B';
      
    • SELECT statements, including complex complicated variants which include

      multiple JOINs, nested SELECTs etc. e.g.:

      tarantool> SELECT sum(column1) FROM table1 WHERE column2 LIKE '_B' GROUP BY column2;
      
    • WITH statements e.g.

      tarantool> WITH cte AS ( SELECT SUBSTR(column2,1,2), column1 FROM table1 WHERE column1 >= 0) SELECT * FROM cte;
      
    • SQL schema is persistent, so it is able to survive snapshot()/restore() sequence.

    • SQL features are described in a tutorial.

Нашли ответ на свой вопрос?
Обратная связь