Submodule box.space | Tarantool
Submodule box.space

Submodule box.space

CRUD operations in Tarantool are implemented by the box.space submodule. It has the data-manipulation functions select, insert, replace, update, upsert, delete, get, put. It also has members, such as id, and whether or not a space is enabled. Submodule source code is available in file src/box/lua/schema.lua.

Below is a list of all box.space functions and members.

Name Use
space_object:auto_increment() Generate key + Insert a tuple
space_object:bsize() Get count of bytes
space_object:count() Get count of tuples
space_object:create_index() Create an index
space_object:delete() Delete a tuple
space_object:drop() Destroy a space
space_object:format() Declare field names and types
space_object:frommap() Convert from map to tuple or table
space_object:get() Select a tuple
space_object:insert() Insert a tuple
space_object:len() Get count of tuples
space_object:on_replace() Create a replace trigger with a function that cannot change the tuple
space_object:before_replace() Create a replace trigger with a function that can change the tuple
space_object:pairs() Prepare for iterating
space_object:put() Insert or replace a tuple
space_object:rename() Rename a space
space_object:replace() / put() Insert or replace a tuple
space_object:run_triggers() Enable/disable a replace trigger
space_object:select() Select one or more tuples
space_object:truncate() Delete all tuples
space_object:update() Update a tuple
space_object:upsert() Update a tuple
space_object:user_defined() Any function / method that any user wants to add
space_object:enabled Flag, true if space is enabled
space_object:field_count Required number of fields
space_object:id Numeric identifier of space
space_object:index Container of space’s indexes
box.space._cluster (Metadata) List of replica sets
box.space._func (Metadata) List of function tuples
box.space._index (Metadata) List of indexes
box.space._vindex (Metadata) List of indexes accessible for the current user
box.space._priv (Metadata) List of privileges
box.space._vpriv (Metadata) List of privileges accessible for the current user
box.space._schema (Metadata) List of schemas
box.space._sequence (Metadata) List of sequences
box.space._sequence_data (Metadata) List of sequences
box.space._space (Metadata) List of spaces
box.space._vspace (Metadata) List of spaces accessible for the current user
box.space._user (Metadata) List of users
box.space._vuser (Metadata) List of users accessible for the current user
Found what you were looking for?
Feedback