Skip to content

fastquadtree.InsertResult

Result returned from bulk insertion operations.

This dataclass contains information about items inserted by insert_many or insert_many_np methods, including the total count and the contiguous range of auto-assigned IDs.

Attributes:

Name Type Description
count int

Number of items successfully inserted.

start_id int

First ID in the contiguous ID range.

end_id int

Last ID in the contiguous ID range (inclusive).

Example
result = qt.insert_many([(1.0, 2.0), (3.0, 4.0), (5.0, 6.0)])
print(f"Inserted {result.count} items")
print(f"IDs: {list(result.ids)}")  # [0, 1, 2]

count instance-attribute

start_id instance-attribute

end_id instance-attribute

ids property

Return a range object representing all inserted IDs.

Returns:

Type Description
range

Range from start_id to end_id (inclusive).