space_object:truncate()
-
object
space_object -
space_object:truncate() Deletes all tuples. The method is performed in background and doesn’t block consequent requests.
Parameters: - space_object (space_object) – an object reference
Complexity factors: Index size, Index type, Number of tuples accessed.
Return: nil The
truncatemethod can only be called by the user who created the space, or from within asetuidfunction created by the user who created the space. Read more aboutsetuidfunctions in the reference for box.schema.func.create().The
truncatemethod cannot be called from within a transaction.Example:
tarantool> box.space.tester:truncate() --- ... tarantool> box.space.tester:len() --- - 0 ...
-