MCPcopy Create free account
hub / github.com/Effect-TS/effect / makeCount

Function makeCount

packages/platform/browser/src/IndexedDbQueryBuilder.ts:1647–1672  ·  view source on GitHub ↗
(options: {
  readonly from: IndexedDbQuery.From<Table>
  readonly index: Index | undefined
  readonly only?: IndexedDbQuery.ExtractIndexType<Table, Index> | undefined
  readonly lowerBound?:
    | IndexedDbQuery.ExtractIndexType<Table, Index>
    | undefined
  readonly upperBound?:
    | IndexedDbQuery.ExtractIndexType<Table, Index>
    | undefined
  readonly excludeLowerBound?: boolean | undefined
  readonly excludeUpperBound?: boolean | undefined
})

Source from the content-addressed store, hash-verified

1645}
1646
1647const makeCount = <
1648 Table extends IndexedDbTable.AnyWithProps,
1649 Index extends IndexedDbDatabase.IndexFromTable<Table>
1650>(options: {
1651 readonly from: IndexedDbQuery.From<Table>
1652 readonly index: Index | undefined
1653 readonly only?: IndexedDbQuery.ExtractIndexType<Table, Index> | undefined
1654 readonly lowerBound?:
1655 | IndexedDbQuery.ExtractIndexType<Table, Index>
1656 | undefined
1657 readonly upperBound?:
1658 | IndexedDbQuery.ExtractIndexType<Table, Index>
1659 | undefined
1660 readonly excludeLowerBound?: boolean | undefined
1661 readonly excludeUpperBound?: boolean | undefined
1662}): IndexedDbQuery.Count<Table, Index> => {
1663 const self = Object.create(CountProto)
1664 self.from = options.from
1665 self.index = options.index
1666 self.only = options.only
1667 self.lowerBound = options.lowerBound
1668 self.upperBound = options.upperBound
1669 self.excludeLowerBound = options.excludeLowerBound
1670 self.excludeUpperBound = options.excludeUpperBound
1671 return self
1672}
1673
1674const SelectProto: Omit<
1675 IndexedDbQuery.Select<any, never>,

Callers 7

countFunction · 0.85
equalsFunction · 0.85
gteFunction · 0.85
lteFunction · 0.85
gtFunction · 0.85
ltFunction · 0.85
betweenFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected