Skip to content

Commit 2f20064

Browse files
committed
Remove debug logging
1 parent 8efeda4 commit 2f20064

File tree

3 files changed

+3
-31
lines changed

3 files changed

+3
-31
lines changed

packages/db/src/query/live/collection-config-builder.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ export class CollectionConfigBuilder<
113113
// no nested runs of the graph
114114
// which is possible if the `callback`
115115
// would call `maybeRunGraph` e.g. after it has loaded some more data
116-
console.log(`IGNORING MAYBERUNGRAPH`)
117116
return
118117
}
119118

@@ -128,11 +127,8 @@ export class CollectionConfigBuilder<
128127
syncState.subscribedToAllCollections
129128
) {
130129
while (syncState.graph.pendingWork()) {
131-
console.log(`RUNNING GRAPH`)
132130
syncState.graph.run()
133-
console.log(`Calling callback`)
134131
callback?.()
135-
console.log(`returned from callback`)
136132
}
137133

138134
// On the initial run, we may need to do an empty commit to ensure that

packages/db/tests/query/distinct.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -707,11 +707,11 @@ function createDistinctTests(autoIndex: `off` | `eager`): void {
707707
.distinct(),
708708
})
709709

710-
const results = Array.from(distinctJoinedData.values())
711-
712710
// There are 3 distinct departments that have active users
713711
expect(distinctJoinedData.size).toBe(3)
714712

713+
const results = Array.from(distinctJoinedData.values())
714+
715715
// Should have distinct combinations of department
716716
const combinations = results.map((r) => `${r.department}`)
717717
const uniqueCombinations = [...new Set(combinations)]

packages/db/tests/query/order-by.test.ts

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -257,10 +257,8 @@ function createOrderByTests(autoIndex: `off` | `eager`): void {
257257
let departmentsCollection: ReturnType<typeof createDepartmentsCollection>
258258

259259
beforeEach(() => {
260-
console.log(`before each`)
261260
employeesCollection = createEmployeesCollection(autoIndex)
262261
departmentsCollection = createDepartmentsCollection(autoIndex)
263-
console.log(`end of before each`)
264262
})
265263

266264
describe(`Basic OrderBy`, () => {
@@ -407,7 +405,6 @@ function createOrderByTests(autoIndex: `off` | `eager`): void {
407405
})
408406

409407
it(`applies offset correctly with ordering`, async () => {
410-
console.log(`in applies offset correctly with ordering`)
411408
const collection = createLiveQueryCollection((q) =>
412409
q
413410
.from({ employees: employeesCollection })
@@ -428,7 +425,6 @@ function createOrderByTests(autoIndex: `off` | `eager`): void {
428425
})
429426

430427
it(`applies both limit and offset with ordering`, async () => {
431-
console.log(`in applies both limit and offset with ordering`)
432428
const collection = createLiveQueryCollection((q) =>
433429
q
434430
.from({ employees: employeesCollection })
@@ -450,7 +446,6 @@ function createOrderByTests(autoIndex: `off` | `eager`): void {
450446
})
451447

452448
it(`throws error when limit/offset used without orderBy`, () => {
453-
console.log(`in throws error when limit/offset used without orderBy`)
454449
expect(() => {
455450
createLiveQueryCollection((q) =>
456451
q
@@ -467,9 +462,6 @@ function createOrderByTests(autoIndex: `off` | `eager`): void {
467462
})
468463

469464
it(`applies incremental insert of a new row before the topK correctly`, async () => {
470-
console.log(
471-
`in applies incremental insert of a new row before the topK correctly`
472-
)
473465
const collection = createLiveQueryCollection((q) =>
474466
q
475467
.from({ employees: employeesCollection })
@@ -517,9 +509,6 @@ function createOrderByTests(autoIndex: `off` | `eager`): void {
517509
})
518510

519511
it(`applies incremental insert of a new row inside the topK correctly`, async () => {
520-
console.log(
521-
`in applies incremental insert of a new row inside the topK correctly`
522-
)
523512
const collection = createLiveQueryCollection((q) =>
524513
q
525514
.from({ employees: employeesCollection })
@@ -564,13 +553,9 @@ function createOrderByTests(autoIndex: `off` | `eager`): void {
564553
[6, 62_000],
565554
[2, 60_000],
566555
])
567-
console.log(`end`)
568556
})
569557

570558
it(`applies incremental insert of a new row inside the topK but after max sent value correctly`, async () => {
571-
console.log(
572-
`in applies incremental insert of a new row inside the topK but after max sent value correctly`
573-
)
574559
const collection = createLiveQueryCollection((q) =>
575560
q
576561
.from({ employees: employeesCollection })
@@ -622,9 +607,6 @@ function createOrderByTests(autoIndex: `off` | `eager`): void {
622607
})
623608

624609
it(`applies incremental insert of a new row after the topK correctly`, async () => {
625-
console.log(
626-
`in applies incremental insert of a new row after the topK correctly`
627-
)
628610
const collection = createLiveQueryCollection((q) =>
629611
q
630612
.from({ employees: employeesCollection })
@@ -668,9 +650,6 @@ function createOrderByTests(autoIndex: `off` | `eager`): void {
668650
})
669651

670652
it(`applies incremental update of a row inside the topK correctly`, async () => {
671-
console.log(
672-
`in applies incremental update of a row inside the topK correctly`
673-
)
674653
const collection = createLiveQueryCollection((q) =>
675654
q
676655
.from({ employees: employeesCollection })
@@ -714,9 +693,6 @@ function createOrderByTests(autoIndex: `off` | `eager`): void {
714693
})
715694

716695
it(`applies incremental delete of a row in the topK correctly`, async () => {
717-
console.log(
718-
`in applies incremental delete of a row in the topK correctly`
719-
)
720696
const collection = createLiveQueryCollection((q) =>
721697
q
722698
.from({ employees: employeesCollection })
@@ -1871,6 +1847,6 @@ function createOrderByTests(autoIndex: `off` | `eager`): void {
18711847
}
18721848

18731849
describe(`Query2 OrderBy Compiler`, () => {
1874-
// createOrderByTests(`off`)
1850+
createOrderByTests(`off`)
18751851
createOrderByTests(`eager`)
18761852
})

0 commit comments

Comments
 (0)