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
Add deferrable support for constraint #4584
Conversation
@kibertoad this test seem to be flaky:
|
@@ -86,14 +87,20 @@ class TableCompiler_Oracle extends TableCompiler { | |||
); | |||
} | |||
|
|||
primary(columns, constraintName) { | |||
primary(columns, constraintName, deferrable) { | |||
if (isObject(columns) && !(columns instanceof Array)) { |
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.
I think idiomatic JS way is Array.isArray()
test/integration2/transaction/set-deferrable-constraint.spec.js
Outdated
Show resolved
Hide resolved
test/integration2/transaction/set-deferrable-constraint.spec.js
Outdated
Show resolved
Hide resolved
Great job! Could you also create doc PR at https://github.com/knex/documentation? |
Documentation added. Can you check it out? |
Address #4292 : Add Deferrable Support
deferrable([deferrable])
can be chained offtable.foreign()
orcolumn.references()
column.unique(indexName | options={[indexName: string], [deferrable: string]});
table.unique(columns,indexName | options={[indexName: string], [deferrable: string]});
column.primary(constraintName | options={[constraintName : string], [deferrable: string]});
table.primary(columns,constraintName | options={[constraintName : string], [deferrable: string]});