nixnet.database.collection

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

Bases: Mapping

Collection of database objects.

add(name: str) DatabaseObject[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.