Tarantool CE/EE Documentation portal logo
Помощь
Обновлена 15 сентября 2026 г. в 08:55

space

space

  • id,

  • owner (= идентификатор пользователя-владельца спейса),

  • name, engine, field_count,

  • flags (например, временный),

  • format (созданный с помощью оператора формата).

Эти поля задаются во время создания спейса с помощью box.schema.space.create().

function example()  local ta = {}  local i, line  for k, v in box.space._space:pairs() do    i = 1    line = ''    while i <= #v do      if type(v[i]) ~= 'table' then        line = line .. v[i] .. ' '      end    i = i + 1    end    table.insert(ta, line)  end  return taend
tarantool> example()---- - '272 1 _schema memtx 0  '  - '280 1 _space memtx 0  '  - '281 1 _vspace sysview 0  '  - '288 1 _index memtx 0  '  - '296 1 _func memtx 0  '  - '304 1 _user memtx 0  '  - '305 1 _vuser sysview 0  '  - '312 1 _priv memtx 0  '  - '313 1 _vpriv sysview 0  '  - '320 1 _cluster memtx 0  '  - '512 1 tester memtx 0  '  - '513 1 origin vinyl 0  '  - '514 1 archive memtx 0  '...
tarantool> box.schema.space.create('TM', {         >   id = 12345,         >   format = {         >     [1] = {["name"] = "field_1"},         >     [2] = {["type"] = "unsigned"}         >   }         > })---- index:   on_replace: 'function: 0x41c67338'  temporary: false  id: 12345  engine: memtx  enabled: false  name: TM  field_count: 0- created...tarantool> box.space._space:select(12345)---- - [12345, 1, 'TM', 'memtx', 0, {}, [{'name': 'field_1'}, {'type': 'unsigned'}]]...