Method: Sequel::Postgres::DatabaseMethods#immediate_constraints
- Defined in:
- lib/sequel/adapters/shared/postgres.rb
permalink #immediate_constraints(opts = OPTS) ⇒ Object
Immediately apply deferrable constraints.
- :constraints
-
An identifier of the constraint, or an array of identifiers for constraints, to apply this change to specific constraints.
- :server
-
The server/shard on which to run the query.
Examples:
DB.immediate_constraints
# SET CONSTRAINTS ALL IMMEDIATE
DB.immediate_constraints(constraints: [:c1, Sequel[:sc][:c2]])
# SET CONSTRAINTS "c1", "sc"."s2" IMMEDIATE
647 648 649 |
# File 'lib/sequel/adapters/shared/postgres.rb', line 647 def immediate_constraints(opts=OPTS) _set_constraints(' IMMEDIATE', opts) end |