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

Function makeSelect

packages/platform/browser/src/IndexedDbQueryBuilder.ts:1810–1843  ·  view source on GitHub ↗
(options: {
  readonly from: IndexedDbQuery.From<Table>
  readonly index?: Index | undefined
  readonly limitValue?: number | undefined
  readonly offsetValue?: number | undefined
  readonly reverseValue?: boolean | 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
  readonly predicate?: ((item: IndexedDbTable.Encoded<Table>) => boolean) | undefined
})

Source from the content-addressed store, hash-verified

1808}
1809
1810const makeSelect = <
1811 Table extends IndexedDbTable.AnyWithProps,
1812 Index extends IndexedDbDatabase.IndexFromTable<Table>
1813>(options: {
1814 readonly from: IndexedDbQuery.From<Table>
1815 readonly index?: Index | undefined
1816 readonly limitValue?: number | undefined
1817 readonly offsetValue?: number | undefined
1818 readonly reverseValue?: boolean | undefined
1819 readonly only?: IndexedDbQuery.ExtractIndexType<Table, Index> | undefined
1820 readonly lowerBound?:
1821 | IndexedDbQuery.ExtractIndexType<Table, Index>
1822 | undefined
1823 readonly upperBound?:
1824 | IndexedDbQuery.ExtractIndexType<Table, Index>
1825 | undefined
1826 readonly excludeLowerBound?: boolean | undefined
1827 readonly excludeUpperBound?: boolean | undefined
1828 readonly predicate?: ((item: IndexedDbTable.Encoded<Table>) => boolean) | undefined
1829}): IndexedDbQuery.Select<Table, Index> => {
1830 const self = Object.create(SelectProto)
1831 self.from = options.from
1832 self.index = options.index
1833 self.only = options.only
1834 self.limitValue = options.limitValue
1835 self.offsetValue = options.offsetValue
1836 self.reverseValue = options.reverseValue
1837 self.lowerBound = options.lowerBound
1838 self.upperBound = options.upperBound
1839 self.excludeLowerBound = options.excludeLowerBound
1840 self.excludeUpperBound = options.excludeUpperBound
1841 self.predicate = options.predicate
1842 return self as any
1843}
1844
1845const FirstProto: Omit<
1846 IndexedDbQuery.First<any, never>,

Callers 12

selectFunction · 0.85
limitFunction · 0.85
offsetFunction · 0.85
equalsFunction · 0.85
gteFunction · 0.85
lteFunction · 0.85
gtFunction · 0.85
ltFunction · 0.85
betweenFunction · 0.85
reverseFunction · 0.85
filterFunction · 0.85
streamFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected