(name, { where } = {})
| 337 | const query = { |
| 338 | internal, |
| 339 | async count(name, { where } = {}) { |
| 340 | const table = toTable(name); |
| 341 | let conditions = where ? buildCondition(table.columns, where) : undefined; |
| 342 | if (conditions === true) conditions = undefined; |
| 343 | if (conditions === false) return 0; |
| 344 | |
| 345 | const constrainedWhere = await applyReadPolicies(table, conditions, context); |
| 346 | if (constrainedWhere === false) return 0; |
| 347 | return await internal.count(table, { where: constrainedWhere }); |
| 348 | }, |
| 349 | async upsert(name, { where, ...options }) { |
| 350 | const table = toTable(name); |
| 351 | const conditions = where ? buildCondition(table.columns, where) : undefined; |
nothing calls this directly
no test coverage detected