nixnet.database.collection

class nixnet.database._collection.DbCollection(handle, db_type, prop_id, factory)[source]

Bases: collections.abc.Mapping

Collection of database objects.

add(name)[source]

Add a new database object to the collection.

Parameters:name (str) – Name of the new database object.
Returns:An instance of the new database object.
Return type:DatabaseObject
get(k[, d]) → D[k] if k in D, else d. d defaults to None.
items()[source]

Return all database object names and objects in the collection.

Yields:An iterator to tuple pairs of database object names and objects in the collection
keys()[source]

Return database object names in the collection.

Yields:An iterator to database object names in the collection.
values()[source]

Return database objects in the collection.

Yields:An iterator to database objects in the collection.