Read the docs the docs from DB.
(keys, for_update=False)
| 133 | |
| 134 | |
| 135 | def read_docs(keys, for_update=False): |
| 136 | """Read the docs the docs from DB.""" |
| 137 | if not keys: |
| 138 | return [] |
| 139 | |
| 140 | debug("BEGIN SELECT") |
| 141 | q = "SELECT thing.id, thing.key, thing.latest_revision as revision FROM thing WHERE key IN $keys" |
| 142 | if for_update: |
| 143 | q += " FOR UPDATE" |
| 144 | docs = db.query(q, vars=locals()) |
| 145 | docs = docs.list() |
| 146 | debug("END SELECT") |
| 147 | _fill_data(docs) |
| 148 | return docs |
| 149 | |
| 150 | |
| 151 | def update_docs(docs, comment, author, ip="127.0.0.1"): |
nothing calls this directly
no test coverage detected