Tarantool CE/EE Documentation portal logo
Support
Updated at July 17, 2026   02:08 PM

space_object:insert()

space_object

insert(tuple)

Insert a tuple into a space.

Parameters:

  • space_object (space_object) — an object reference

  • tuple (tuple/table) — tuple to be inserted.

Returns

the inserted tuple

Return type

tuple

Possible errors:

  • ER_TUPLE_FOUND if a tuple with the same unique-key value already exists.
  • ER_TRANSACTION_CONFLICT if a transaction conflict is detected in the MVCC transaction mode.

Example:

tarantool> box.space.tester:insert{5000,'tuple number five thousand'}---- [5000, 'tuple number five thousand']...

For more usage scenarios and typical errors see Example: using data operations further in this section.