File tree 3 files changed +75
-0
lines changed
doc/reference/reference_lua
3 files changed +75
-0
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ with ``box``, with no arguments. The ``box`` module contains:
27
27
box_error
28
28
box_index
29
29
box_info
30
+ box_read_view
30
31
box_schema
31
32
box_schema_sequence
32
33
box_session
Original file line number Diff line number Diff line change
1
+ -------------------------------------------------------------------------------
2
+ Submodule box.read_view
3
+ -------------------------------------------------------------------------------
4
+
5
+ The box.read_view submodule contains functions related to read views.
6
+
7
+ .. container :: table
8
+
9
+ .. rst-class :: left-align-column-1
10
+ .. rst-class :: left-align-column-2
11
+
12
+ .. list-table ::
13
+ :widths: 25 75
14
+ :header-rows: 1
15
+
16
+ * - Name
17
+ - Use
18
+
19
+ * - :doc: `./box_read_view/list `
20
+ - Return an array of all active database read views.
21
+
22
+
23
+ .. toctree ::
24
+ :hidden:
25
+
26
+ box_read_view/list
Original file line number Diff line number Diff line change
1
+ .. _reference_lua-box_read_view_list :
2
+
3
+ ===============================================================================
4
+ box.read_view.list()
5
+ ===============================================================================
6
+
7
+ .. function :: read_view.list()
8
+
9
+ Return an array of all active database read views.
10
+ This array might include the following read view types:
11
+
12
+ * `read views <https://www.tarantool.io/en/enterprise_doc/read_views/ >`_ created by application code (available in Tarantool Enterprise only)
13
+
14
+ * system read views (used, for example, to make a :ref: `checkpoint <book_cfg_checkpoint_daemon >`
15
+ or join a new :ref: `replica <replication-architecture >`)
16
+
17
+ Read views created by application code also have the ``space `` field.
18
+ The field lists all spaces available in a read view,
19
+ and may be used like a read view object returned by ``box.read_view.open() ``.
20
+
21
+ .. NOTE ::
22
+
23
+ ``read_view.list() `` also contains read views created using the
24
+ `C API <https://www.tarantool.io/en/enterprise_doc/read_views/c_api/ >`_ (``box_raw_read_view_new() ``).
25
+ Note that you cannot access database spaces included in such views from Lua.
26
+
27
+
28
+ **Example: **
29
+
30
+ .. code-block :: tarantoolsession
31
+
32
+ tarantool> box.read_view.list()
33
+ ---
34
+ - - timestamp: 1138.98706933
35
+ signature: 47
36
+ is_system: false
37
+ status: open
38
+ vclock: &0 {1: 47}
39
+ name: read_view1
40
+ id: 1
41
+ - timestamp: 1172.202995842
42
+ signature: 49
43
+ is_system: false
44
+ status: open
45
+ vclock: &1 {1: 49}
46
+ name: read_view2
47
+ id: 2
48
+ ...
You can’t perform that action at this time.
0 commit comments