Skip to content

Commit

Permalink
Fixed sortKey
Browse files Browse the repository at this point in the history
  • Loading branch information
drodrigues4 committed Jul 27, 2024
1 parent 2e846a6 commit d20e3ca
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions drizzle-orm/src/singlestore-core/indexes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,12 @@ export function fulltext(name: string, config: FullTextIndexConfig): FullTextInd
return new FullTextIndexBuilderOn(name, config);
}

export type SortKeyColumn = SingleStoreColumn | SQL;

export class SortKeyBuilder {
static readonly [entityKind]: string = 'SingleStoreSortKeyBuilder';

constructor(private columns: IndexColumn[]) {}
constructor(private columns: SortKeyColumn[]) {}

/** @internal */
build(table: SingleStoreTable): SortKey {
Expand All @@ -181,9 +183,9 @@ export class SortKeyBuilder {
export class SortKey {
static readonly [entityKind]: string = 'SingleStoreSortKey';

constructor(public columns: IndexColumn[], public table: SingleStoreTable) {}
constructor(public columns: SortKeyColumn[], public table: SingleStoreTable) {}
}

export function sortKey(...columns: [IndexColumn, ...IndexColumn[]]): SortKeyBuilder {
export function sortKey(...columns: SortKeyColumn[]): SortKeyBuilder {
return new SortKeyBuilder(columns);
}

0 comments on commit d20e3ca

Please sign in to comment.