Skip to content

Commit fa1e85e

Browse files
committed
Ran prettier
1 parent f2f8040 commit fa1e85e

File tree

3 files changed

+7
-13
lines changed

3 files changed

+7
-13
lines changed

packages/db/src/indexes/auto-index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1+
import { DEFAULT_COMPARE_OPTIONS } from "../utils"
12
import { BTreeIndex } from "./btree-index"
23
import type { CompareOptions } from "../query/builder/types"
34
import type { BasicExpression } from "../query/ir"
45
import type { CollectionImpl } from "../collection/index.js"
5-
import { DEFAULT_COMPARE_OPTIONS } from "../utils"
66

77
export interface AutoIndexConfig {
88
autoIndex?: `off` | `eager`
@@ -33,7 +33,7 @@ export function ensureIndexForField<
3333

3434
const compareOpts = compareOptions ?? {
3535
...DEFAULT_COMPARE_OPTIONS,
36-
...collection.compareOptions
36+
...collection.compareOptions,
3737
}
3838

3939
// Check if we already have an index for this field

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,9 @@ describe(`QueryBuilder.orderBy`, () => {
161161
expect(builtQuery.orderBy).toHaveLength(1)
162162
expect(builtQuery.orderBy![0]!.compareOptions.stringSort).toBe(`locale`)
163163
expect((builtQuery.orderBy![0]!.compareOptions as any).locale).toBe(`de-DE`)
164-
expect((builtQuery.orderBy![0]!.compareOptions as any).localeOptions).toEqual({
164+
expect(
165+
(builtQuery.orderBy![0]!.compareOptions as any).localeOptions
166+
).toEqual({
165167
sensitivity: `base`,
166168
})
167169
expect(builtQuery.orderBy![0]!.compareOptions.nulls).toBe(`first`)

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

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2336,11 +2336,7 @@ describe(`OrderBy with collection-level StringSortOpts`, () => {
23362336

23372337
// In lexical comparison, uppercase letters come before lowercase letters
23382338
const firstResults = Array.from(firstQuery.values())
2339-
expect(firstResults.map((r) => r.name)).toEqual([
2340-
`Charlie`,
2341-
`alice`,
2342-
`bob`,
2343-
])
2339+
expect(firstResults.map((r) => r.name)).toEqual([`Charlie`, `alice`, `bob`])
23442340

23452341
// Second query with explicit locale stringSort should override collection's lexical default
23462342
const secondQuery = createLiveQueryCollection((q) =>
@@ -2380,11 +2376,7 @@ describe(`OrderBy with collection-level StringSortOpts`, () => {
23802376

23812377
// Should revert back to lexical sorting (collection default)
23822378
const thirdResults = Array.from(thirdQuery.values())
2383-
expect(thirdResults.map((r) => r.name)).toEqual([
2384-
`bob`,
2385-
`alice`,
2386-
`Charlie`,
2387-
])
2379+
expect(thirdResults.map((r) => r.name)).toEqual([`bob`, `alice`, `Charlie`])
23882380
})
23892381
})
23902382

0 commit comments

Comments
 (0)