Part of twistar
Line # | Kind | Name | Docs |
---|---|---|---|
8 | Function | createInstances | Create an instance of list of instances of a given class
using the given properties. |
31 | Function | dictToWhere | Convert a dictionary of attribute: value to a where statement. |
47 | Function | joinWheres | Take two wheres (of the same format as the where parameter
in the function DBObject.find )
and join them. |
65 | Function | joinMultipleWheres | Take a list of wheres (of the same format as the where
parameter in the function DBObject.find )
and join them. |
84 | Function | deferredDict | Just like a defer.DeferredList but instead accepts and
returns a dict . |
list
of instances of a given class
using the given properties.Parameters | props | One of:
|
Returns | A Deferred that will pass the result to a callback |
For instance, dictToWhere({'one': 'two', 'three': 'four'}) returns: ['(one = ?) AND (three = ?)', 'two', 'four']
Returns | Expression above if len(attrs) > 0, None otherwise |
where
parameter
in the function DBObject.find
)
and join them.Parameters | wone | First where list |
wone | Second where list | |
joiner | Optional text for joining the two wheres. | |
Returns | A joined version of the two given wheres. |
where
parameter in the function DBObject.find
)
and join them.Parameters | wheres | List of where clauses to join list |
joiner | Optional text for joining the two wheres. | |
Returns | A joined version of the list of the given wheres. |
defer.DeferredList
but instead accepts and
returns a dict
.Parameters | d | A dict whose values are all Deferred objects. |
Returns | A DeferredList whose callback will be given a dictionary whose
keys are the same as the parameter d 's and whose values are
the results of each individual deferred call. |