Revision 146
Added by Aaron Marcuse-Kubitza about 13 years ago
db_xml.py | ||
---|---|---|
33 | 33 |
elif child_name == name: return child |
34 | 34 |
return None |
35 | 35 |
|
36 |
def get(db, node, pkeys=None): |
|
36 |
def get(db, node, pkeys=None, limit=None):
|
|
37 | 37 |
if pkeys == None: pkeys = {} |
38 | 38 |
def pkey(table): return sql.pkey(db, pkeys, table) |
39 | 39 |
|
... | ... | |
52 | 52 |
if id_ != '': conds[pkey(table)] = id_ # replace any existing pkey value |
53 | 53 |
if fields == []: fields.append(pkey_) |
54 | 54 |
|
55 |
return sql.select(db, table, fields, conds) |
|
55 |
return sql.select(db, table, fields, conds, limit)
|
|
56 | 56 |
|
57 | 57 |
def put(db, node, store_ids=False, row_ct_ref=None, pkeys=None, parent_id=None): |
58 | 58 |
'''store_ids enables searching the tree for missing fields''' |
Also available in: Unified diff
db_xml.get(): Pass limit through to SQL query