(name, { where } = {})
| 415 | const query = { |
| 416 | internal, |
| 417 | async count(name, { where } = {}) { |
| 418 | const table = toTable(name); |
| 419 | let conditions = where ? buildCondition(table.columns, where) : undefined; |
| 420 | if (conditions === true) conditions = undefined; |
| 421 | if (conditions === false) return 0; |
| 422 | |
| 423 | const constrainedWhere = await applyReadPolicies(table, conditions, context); |
| 424 | if (constrainedWhere === false) return 0; |
| 425 | return await internal.count(table, { where: constrainedWhere }); |
| 426 | }, |
| 427 | async upsert(name, { where, ...options }) { |
| 428 | const table = toTable(name); |
| 429 | const conditions = where ? buildCondition(table.columns, where) : undefined; |
nothing calls this directly
no test coverage detected