Lua API | Enterprise
Документация на русском языке
поддерживается сообществом
Read views Lua API

Lua API

This topic describes the Lua API for working with read views.

box.read_view:open({opts})

Create a new read view.

Параметры

opts (table) – (optional) configurations options for a read view. For example, the name option specifies a read view name. If name is not specified, a read view name is set to unknown.

Результат

a created read view object

Тип результата

read_view_object

Example:

tarantool> read_view1 = box.read_view.open({name = 'read_view1'})
class read_view_object

An object that represents a read view.

read_view_object:info()

Get information about a read view such as a name, status, or ID. All the available fields are listed below in the object options.

Результат

information about a read view

Тип результата

table

read_view_object:close()

Close a read view. After the read view is closed, its status is set to closed. On an attempt to use it, an error is raised.

status

A read view status. The possible values are open and closed.

Тип результата

string

id

A unique numeric identifier of a read view.

Тип результата

number

name

A read view name. You can specify a read view name in the box.read_view.open() arguments.

Тип результата

string

is_system

Determine whether a read view is system. For example, system read views can be created to make a checkpoint or join a new replica.

Тип результата

boolean

timestamp

The fiber.clock() value at the moment of opening a read view.

Тип результата

number

vclock

The box.info.vclock value at the moment of opening a read view.

Тип результата

table

signature

The box.info.signature value at the moment of opening a read view.

Тип результата

number

space

Get access to database spaces included in a read view. You can use this field to query space data.

Тип результата

space object

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