space_object:count()
-
object
space_object¶ -
space_object:count([key][, iterator])¶ Return the number of tuples. If compared with len(), this method works slower because
count()scans the entire space to count the tuples.Parameters: - space_object (
space_object) – an object reference - key (
scalar/table) – primary-key field values, must be passed as a Lua table if key is multi-part - iterator – comparison method
Return: Number of tuples.
Possible errors:
ER_TRANSACTION_CONFLICTif a transaction conflict is detected in the MVCC transaction mode.
Example:
tarantool> box.space.tester:count(2, {iterator='GE'}) --- - 1 ...
- space_object (
-