New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve Typing: add typescript support for deferrable, new Primary/Unique syntax #4589
Conversation
@@ -1908,12 +1909,16 @@ export declare namespace Knex { | |||
uuid(columnName: string): ColumnBuilder; | |||
comment(val: string): TableBuilder; | |||
specificType(columnName: string, type: string): ColumnBuilder; | |||
primary(columnNames: readonly string[], options?: Readonly<{constraintName?: string, deferrable?: deferrableType}>): TableBuilder; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New type for primary using options object
primary(columnNames: readonly string[], constraintName?: string): TableBuilder; | ||
index( | ||
columnNames: string | readonly (string | Raw)[], | ||
indexName?: string, | ||
indexType?: string | ||
): TableBuilder; | ||
unique(columnNames: readonly (string | Raw)[], options?: Readonly<{indexName?: string, deferrable?: deferrableType}>): TableBuilder; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added type for unique using options object
@@ -1908,12 +1909,16 @@ export declare namespace Knex { | |||
uuid(columnName: string): ColumnBuilder; | |||
comment(val: string): TableBuilder; | |||
specificType(columnName: string, type: string): ColumnBuilder; | |||
primary(columnNames: readonly string[], options?: Readonly<{constraintName?: string, deferrable?: deferrableType}>): TableBuilder; | |||
/** @deprecated */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add deprecate tag for old syntax
@kibertoad Hi i added type support for the the new deferrable support that was added. Also added a datetime type |
also addressing missing datetime missing in
close #3944