forked from kysely-org/kysely
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
revisiting
orderBy
. (kysely-org#1326)
- Loading branch information
1 parent
22895c1
commit 25fe2d0
Showing
27 changed files
with
1,146 additions
and
292 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { freeze } from '../util/object-utils.js' | ||
import { IdentifierNode } from './identifier-node.js' | ||
import { OperationNode } from './operation-node.js' | ||
|
||
export interface CollateNode extends OperationNode { | ||
readonly kind: 'CollateNode' | ||
readonly collation: IdentifierNode | ||
} | ||
|
||
/** | ||
* @internal | ||
*/ | ||
export const CollateNode = { | ||
is(node: OperationNode): node is CollateNode { | ||
return node.kind === 'CollateNode' | ||
}, | ||
|
||
create(collation: string): CollateNode { | ||
return freeze({ | ||
kind: 'CollateNode', | ||
collation: IdentifierNode.create(collation), | ||
}) | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export type Collation = | ||
// anything super common or simple should be added here. | ||
// https://sqlite.org/datatype3.html#collating_sequences | ||
| 'nocase' | ||
| 'binary' | ||
| 'rtrim' | ||
// otherwise, allow any string, while still providing autocompletion. | ||
| (string & {}) |
Oops, something went wrong.