Module Expr Str ImportFrom alias alias ImportFrom alias alias ImportFrom alias alias FunctionDef arguments args NameParam defaults body Expr Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Str If BoolOpAnd CompareEq NameLoad NameLoad BoolOpOr NameLoad NameLoad body Return Call AttributeLoad NameLoad attr BoolOpOr NameLoad BinOpAdd Str NameLoad BoolOpOr BoolOpAnd NameLoad NameLoad NameLoad orelse Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str If NameLoad body If Call NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Dict Str Dict Str ListComp Call NameLoad NameLoad comprehension NameStore NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Return ListComp Call NameLoad NameLoad comprehension NameStore NameLoad orelse Return Call NameLoad Call AttributeLoad NameLoad attr Dict Str Call NameLoad NameLoad If NameLoad body Assign NameStore AttributeLoad NameLoad attr orelse Assign NameStore AttributeLoad NameLoad attr If NameLoad body Assign NameStore Call NameLoad Dict Str NameLoad orelse Assign NameStore Call NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr BinOpMult NameLoad NameLoad If BoolOpAnd CompareEq NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If NameLoad body Return Call AttributeLoad NameLoad attr If NameLoad body Return Call NameLoad NameLoad orelse Assign NameStore Call NameLoad NameLoad Return ListComp Call NameLoad NameLoad comprehension NameStore NameLoad decorator_list
N/A N/A 
model.model_engine.py
~~~~~~~~~~~

:copyright: (c) 2014 by @zizzamia
:license: BSD (See LICENSE for details)
 pymongo ASCENDING DESCENDING bombolone.config PORT_DATABASE DATABASE bombolone.core.utils ensure_objectid is_iterable denormalize N/A N/A item N/A N/A N/A N/A item N/A sort_if_you_must N/A N/A items only_one sorted_by sort_lang sort_ascending N/A N/A N/A  Sorts the filtered query results, if they're more than one  N/A N/A N/A only_one False N/A sorted_by sort_lang N/A N/A N/A N/A items sort N/A sorted_by N/A name. sort_lang N/A N/A sort_ascending ASCENDING DESCENDING N/A N/A items N/A db_engine N/A N/A collection item_id only_one conditions sorted_by sort_lang sort_ascending skip limit count denormalize N/A None None False None None None True None None None denormalize N/A N/A  
	MongoDB Engine of Bombolone
	There are several main steps that every model need it.
	- Looking specifically for one or more items?
      No further filtering needed!
	- Looking for one user only or more
	- Queries the collection conditions
	- Sorts the filtered query results, if they're more than one
	- The skip() expression allows to implementing "paging"
	- Limit the maximum number of results to return.
      For best performance, use limit() whenever possible.
      Otherwise, the database may return more objects than are required for processing.
    - Count the items

    :return a number, when count is True
	:return a dictionary, when only_one is True
	:return a list, when only_one is False

	 N/A item_id N/A N/A N/A is_iterable item_id N/A N/A list_items N/A N/A collection find N/A _id N/A $in N/A N/A ensure_objectid x N/A x item_id N/A list_items N/A sort_if_you_must list_items only_one sorted_by sort_lang sort_ascending N/A N/A N/A denormalize item N/A item list_items N/A N/A N/A denormalize N/A N/A collection find_one N/A _id N/A ensure_objectid item_id N/A only_one N/A N/A f N/A collection find_one N/A N/A f N/A collection find N/A conditions N/A N/A items N/A f N/A $and conditions N/A N/A items N/A f N/A items N/A sort_if_you_must items only_one sorted_by sort_lang sort_ascending N/A skip N/A N/A items N/A N/A items skip N/A skip limit N/A N/A N/A only_one False limit N/A N/A items N/A N/A items limit limit N/A count N/A N/A N/A N/A items count N/A only_one N/A N/A N/A denormalize items N/A N/A list_items N/A list items N/A N/A N/A denormalize item N/A item list_items N/A