Skip to content

Commit

Permalink
Fix indexConfig in indexedColumn
Browse files Browse the repository at this point in the history
  • Loading branch information
AndriiSherman committed May 10, 2024
1 parent 0a473f4 commit a420907
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions drizzle-orm/src/pg-core/columns/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,27 +145,27 @@ export class IndexedColumn<
indexConfig = { order: this.config.order, nulls: this.config.nulls, op: this.config.opClass };

asc(): Omit<this, 'asc' | 'desc'> {
this.config.order = 'asc';
this.indexConfig.order = 'asc';
return this;
}

desc(): Omit<this, 'asc' | 'desc'> {
this.config.order = 'desc';
this.indexConfig.order = 'desc';
return this;
}

nullsFirst(): Omit<this, 'nullsFirst' | 'nullsLast'> {
this.config.nulls = 'first';
this.indexConfig.nulls = 'first';
return this;
}

nullsLast(): Omit<this, 'nullsFirst' | 'nullsLast'> {
this.config.nulls = 'last';
this.indexConfig.nulls = 'last';
return this;
}

op(opClass: string): Omit<this, 'op'> {
this.config.opClass = opClass;
this.indexConfig.op = opClass;
return this;
}
}
Expand Down

0 comments on commit a420907

Please sign in to comment.