def select_by(self, *args, **params):
"""returns an array of object instances based on the given clauses and key/value criterion.
*args is a list of zero or more ClauseElements which will be connected by AND operators.
**params is a set of zero or more key/value parameters which are converted into ClauseElements.
the keys are mapped to property or column names mapped by this mapper's Table, and the values
are coerced into a WHERE clause separated by AND operators. If the local property/column
names dont contain the key, a search will be performed against this mapper's immediate
list of relations as well, forming the appropriate join conditions if a matching property
is located.
e.g. result = usermapper.select_by(user_name = 'fred')
"""
return self.select_whereclause(self._by_clause(*args, **params))
评论列表
文章目录