MCPcopy Index your code
hub / github.com/cameri/nostream / makeQuery

Function makeQuery

test/unit/cli/export.spec.ts:32–44  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

30
31const createMockDb = (rows: EventRow[]) => {
32 const makeQuery = () => ({
33 select() {
34 return this
35 },
36 whereNull() {
37 return this
38 },
39 orderBy() {
40 return this
41 },
42 first: async () => (rows[0] ? { event_id: rows[0].event_id } : undefined),
43 stream: () => Readable.from(rows),
44 })
45
46 const db = ((table: string) => {
47 if (table !== 'events') {

Callers 1

createMockDbFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected