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

Function make

packages/platform/browser/src/IndexedDbQueryBuilder.ts:2047–2065  ·  view source on GitHub ↗
({
  IDBKeyRange,
  database,
  tables,
  reactivity
}: {
  readonly database: MutableRef.MutableRef<globalThis.IDBDatabase>
  readonly IDBKeyRange: typeof globalThis.IDBKeyRange
  readonly tables: ReadonlyMap<string, IndexedDbVersion.Tables<Source>>
  readonly reactivity: Reactivity.Reactivity["Service"]
})

Source from the content-addressed store, hash-verified

2045 * @since 4.0.0
2046 */
2047export const make = <Source extends IndexedDbVersion.AnyWithProps>({
2048 IDBKeyRange,
2049 database,
2050 tables,
2051 reactivity
2052}: {
2053 readonly database: MutableRef.MutableRef<globalThis.IDBDatabase>
2054 readonly IDBKeyRange: typeof globalThis.IDBKeyRange
2055 readonly tables: ReadonlyMap<string, IndexedDbVersion.Tables<Source>>
2056 readonly reactivity: Reactivity.Reactivity["Service"]
2057}): IndexedDbQueryBuilder<Source> => {
2058 const self = Object.create(QueryBuilderProto)
2059 self.tables = tables
2060 self.database = database
2061 self.reactivity = reactivity
2062 self.IDBKeyRange = IDBKeyRange
2063 self.fromCache = new Map()
2064 return self
2065}
2066
2067const getOrCreateTransaction = (
2068 database: globalThis.IDBDatabase,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected