-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtest.lua
More file actions
55 lines (46 loc) · 892 Bytes
/
test.lua
File metadata and controls
55 lines (46 loc) · 892 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
box.cfg{
listen = '127.0.0.1:10001',
}
box.schema.user.grant('guest', 'read,write,execute', 'universe')
function same(...)
return ...
end
function test2(a, b)
return b, a, "test"
end
function test3(int, uint, string, array_of_int)
local a2 = {int, uint}
local a3 = {string, string}
return array_of_int, a2, a3, "testing"
end
function create_tuple(create)
if (create == 0) then
return box.tuple.new{'abc', 'def', 'ghi', 'abc'}
end
return nil
end
function str_table()
local t = {}
t["F1"] = "DATA"
t["F2"] = 1
t["k"] = 100
return t
end
function table_in_array()
local t = {}
t["F1"] = "DATA"
return {1, 2, t}, 3
end
function num_table()
local t = {}
t[10] = "DATA"
t[100] = 1
t[2] = 3
return t
end
function mix_table()
local t = {}
t[2] = "DATA"
t["DATA"] = 2
return t
end