The panko.storage.mongo.utils
Module¶
Common functions for MongoDB backend
-
class
panko.storage.mongo.utils.
ConnectionPool
¶ Bases:
object
-
connect
(url, max_retries, retry_interval)¶
-
-
class
panko.storage.mongo.utils.
CursorProxy
(cursor, max_retry, retry_interval)¶ Bases:
pymongo.cursor.Cursor
-
class
panko.storage.mongo.utils.
MongoProxy
(conn, max_retries, retry_interval)¶ Bases:
object
-
create_index
(keys, name=None, *args, **kwargs)¶
-
find
(*args, **kwargs)¶
-
-
panko.storage.mongo.utils.
make_events_query_from_filter
(event_filter)¶ Return start and stop row for filtering and a query.
Query is based on the selected parameter.
- Parameters
event_filter – storage.EventFilter object.
-
panko.storage.mongo.utils.
make_timestamp_range
(start, end, start_timestamp_op=None, end_timestamp_op=None)¶ Create the query document to find timestamps within that range.
This is done by given two possible datetimes and their operations. By default, using $gte for the lower bound and $lt for the upper bound.