From 0c98673c9dc40a4ecf0dfb400124935bfc996a30 Mon Sep 17 00:00:00 2001 From: ocelot-inc <pgulutzan@ocelot.ca> Date: Sun, 13 Sep 2015 15:20:15 -0600 Subject: [PATCH] Updates in box_space.rst+limitations.rst+authentication.rst --- doc/sphinx/book/box/authentication.rst | 6 ++-- doc/sphinx/book/box/box_space.rst | 43 +++++++++++++------------- doc/sphinx/book/box/limitations.rst | 5 +-- 3 files changed, 28 insertions(+), 26 deletions(-) diff --git a/doc/sphinx/book/box/authentication.rst b/doc/sphinx/book/box/authentication.rst index 24345dcbe1..2353c928fe 100644 --- a/doc/sphinx/book/box/authentication.rst +++ b/doc/sphinx/book/box/authentication.rst @@ -210,7 +210,7 @@ then it is dropped: | :codenormal:`tarantool>` :codebold:`box.schema.user.grant('guest', 'execute', 'function', 'f7')` | :codenormal:`---` | :codenormal:`...` - | :codenormal:`tarantool>` :codebold:`.schema.user.revoke('guest', 'execute', 'function', 'f7')` + | :codenormal:`tarantool>` :codebold:`box.schema.user.revoke('guest', 'execute', 'function', 'f7')` | :codenormal:`---` | :codenormal:`...` | :codenormal:`tarantool>` :codebold:`box.schema.func.drop('f7')` @@ -241,7 +241,7 @@ admin might say: .. _connectors: :doc:`../connectors/index` - | :codenormal:`box.space._user:insert{123456,0,'manager'}` + | :codenormal:`box.space._user:insert{123456,0,'manager','user'}` | :codenormal:`box.schema.user.grant('manager', 'read', 'space', '_space')` | :codenormal:`box.schema.user.grant('manager', 'read', 'space', 'payroll')` @@ -337,7 +337,7 @@ inherits from role R2. box.schema.role.create('R2') -- Grant role R2 to role R1 and role R1 to U1 (order doesn't matter) box.schema.role.grant('R1','execute','role','R2') - box.schema.role.grant('U1','execute','role','R1') + box.schema.user.grant('U1','execute','role','R1') -- Grant read and execute privileges to R2 (but not to R1 and not to U1) box.schema.role.grant('R2','read,write','space','T') box.schema.role.grant('R2','execute','universe') diff --git a/doc/sphinx/book/box/box_space.rst b/doc/sphinx/book/box/box_space.rst index 66d9240cea..c8080e942d 100644 --- a/doc/sphinx/book/box/box_space.rst +++ b/doc/sphinx/book/box/box_space.rst @@ -131,16 +131,16 @@ A list of all ``box.space`` functions follows, then comes a list of all | :codenormal:`tarantool>` :codebold:`s:select{1}` | :codenormal:`---` | :codenormal:`- - [1, 'A']` - | :codenormal:`- [1, 'B']` - | :codenormal:`- [1, 'C']` + | |nbsp| |nbsp| :codenormal:`- [1, 'B']` + | |nbsp| |nbsp| :codenormal:`- [1, 'C']` | :codenormal:`...` | :codenormal:`tarantool>` :codebold:`-- must equal 0 fields, so returns all tuples` | :codenormal:`tarantool>` :codebold:`s:select{}` | :codenormal:`---` | :codenormal:`- - [1, 'A']` - | :codenormal:`- [1, 'B']` - | :codenormal:`- [1, 'C']` - | :codenormal:`- [2, 'D']` + | |nbsp| |nbsp| :codenormal:`- [1, 'B']` + | |nbsp| |nbsp| :codenormal:`- [1, 'C']` + | |nbsp| |nbsp| :codenormal:`- [2, 'D']` | :codenormal:`...` For examples of complex ``select`` requests, where one can specify which index to @@ -559,6 +559,7 @@ A list of all ``box.space`` functions follows, then comes a list of all Insert a new tuple using an auto-increment primary key. The space specified by space-name must have a NUM primary key index of type TREE. The primary-key field will be incremented before the insert. + This is only applicable for the memtx storage engine. :param space_object space-object: :param lua-table,box.tuple tuple: tuple's fields, other than the primary-key field. @@ -622,14 +623,14 @@ A list of all ``box.space`` functions follows, then comes a list of all | :codenormal:`console = require('console'); console.delimiter('!')` | :codenormal:`function example()` - | :codenormal:`local ta = {}, i, line` - | :codenormal:`for k, v in box.space._schema:pairs() do` - | :codenormal:`i = 1` - | :codenormal:`line = ''` - | :codenormal:`while i <= #v do line = line .. v[i] .. ' ' i = i + 1 end` - | :codenormal:`table.insert(ta, line)` - | :codenormal:`end` - | :codenormal:`return ta` + | |nbsp| |nbsp| :codenormal:`local ta = {}, i, line` + | |nbsp| |nbsp| :codenormal:`for k, v in box.space._schema:pairs() do` + | |nbsp| |nbsp| |nbsp| |nbsp| :codenormal:`i = 1` + | |nbsp| |nbsp| |nbsp| |nbsp| :codenormal:`line = ''` + | |nbsp| |nbsp| |nbsp| |nbsp| :codenormal:`while i <= #v do line = line .. v[i] .. ' ' i = i + 1 end` + | |nbsp| |nbsp| |nbsp| |nbsp| :codenormal:`table.insert(ta, line)` + | |nbsp| |nbsp| :codenormal:`end` + | |nbsp| |nbsp| :codenormal:`return ta` | :codenormal:`end!` | :codenormal:`console.delimiter('')!` @@ -720,14 +721,14 @@ A list of all ``box.space`` functions follows, then comes a list of all | :codenormal:`console = require('console'); console.delimiter('!')` | :codenormal:`function example()` - | :codenormal:`local ta = {}, i, line` - | :codenormal:`for k, v in box.space._index:pairs() do` - | :codenormal:`i = 1` - | :codenormal:`line = ''` - | :codenormal:`while i <= #v do line = line .. v[i] .. ' ' i = i + 1 end` - | :codenormal:`table.insert(ta, line)` - | :codenormal:`end` - | :codenormal:`return ta` + | |nbsp| |nbsp| :codenormal:`local ta = {}, i, line` + | |nbsp| |nbsp| :codenormal:`for k, v in box.space._index:pairs() do` + | |nbsp| |nbsp| |nbsp| |nbsp| :codenormal:`i = 1` + | |nbsp| |nbsp| |nbsp| |nbsp| :codenormal:`line = ''` + | |nbsp| |nbsp| |nbsp| |nbsp| :codenormal:`while i <= #v do line = line .. v[i] .. ' ' i = i + 1 end` + | |nbsp| |nbsp| |nbsp| |nbsp| :codenormal:`table.insert(ta, line)` + | |nbsp| |nbsp| |nbsp| |nbsp| :codenormal:`end` + | |nbsp| |nbsp| :codenormal:`return ta` | :codenormal:`end!` | :codenormal:`console.delimiter('')!` diff --git a/doc/sphinx/book/box/limitations.rst b/doc/sphinx/book/box/limitations.rst index 47b375bd07..7851d49ad1 100644 --- a/doc/sphinx/book/box/limitations.rst +++ b/doc/sphinx/book/box/limitations.rst @@ -43,5 +43,6 @@ Limitations which are only applicable for the sophia storage engine always 1, that is, secondary indexes are not supported. Indexes must be type=TREE, that is, the options type=HASH or type=RTREE or type=BITSET are not supported. Indexes must be unique, that is, the option unique=false - is not supported. The ``alter()`` and ``count()`` functions - are not supported. + is not supported. The ``alter()`` and ``count()`` and + ``min()`` and ``max()`` and ``random()`` and ``auto_increment()`` functions + are not supported. Temporary spaces are not supported. -- GitLab