type StringCollationConfig =
| {
stringSort?: "lexical";
}
| {
locale?: string;
localeOptions?: object;
stringSort?: "locale";
}
| {
compare: (a: string, b: string) => number;
stringSort: "custom";
};Defined in: packages/db/src/types.ts:32
StringCollationConfig - Options for string sorting behavior
This discriminated union allows for three types of string sorting:
Custom comparators must remain deterministic and immutable for their lifetime. Runtime query and index identity uses the exact function reference.