@@ -30,8 +30,8 @@ tuple_object[field-path]
30
30
31
31
In the following example, a tuple named ``t `` is returned from ``replace ``
32
32
and then only the relevant part (in this case, matching a name)
33
- of a relevant field is returned. Namely: the second field, the
34
- sixth part , the value following 'value ='.
33
+ of a relevant field is returned. Namely: the second field, its
34
+ third item , the value following 'key ='.
35
35
36
36
.. code-block :: tarantoolsession
37
37
@@ -44,25 +44,19 @@ tuple_object[field-path]
44
44
tarantool> format[2] = {name = 'field2', type = 'array'}
45
45
---
46
46
...
47
- tarantool> format[3] = {name = 'field4', type = 'string' }
48
- ---
49
- ...
50
- tarantool> format[4] = {name = "[2][6]['пw']['Я']", type = 'string'}
51
- ---
52
- ...
53
47
tarantool> s = box.schema.space.create('test', {format = format})
54
48
---
55
49
...
56
50
tarantool> pk = s:create_index('pk')
57
51
---
58
52
...
59
- tarantool> field2 = {1, 2, 3, "4 ", {5,6,7}, {пw={Я="п"}, key="V! ", value="K! "}}
53
+ tarantool> field2_value = {1, "ABC ", {key="Hello ", value="world "}}
60
54
---
61
55
...
62
- tarantool> t = s:replace{1, field2, "123456", "Not K!" }
56
+ tarantool> t = s:replace{1, field2_value }
63
57
---
64
58
...
65
- tarantool> t["[2][6 ]['value ']"]
59
+ tarantool> t["[2][3 ]['key ']"]
66
60
---
67
- - K!
61
+ - Hello
68
62
...
0 commit comments