| Module | Sequel::JDBC::H2::DatabaseMethods |
| In: |
lib/sequel_core/adapters/jdbc/h2.rb
|
H2 needs to add a primary key column as a constraint
# File lib/sequel_core/adapters/jdbc/h2.rb, line 8
8: def alter_table_sql(table, op)
9: case op[:op]
10: when :add_column
11: if op.delete(:primary_key)
12: sql = super(table, op)
13: [sql, "ALTER TABLE #{quote_schema_table(table)} ADD PRIMARY KEY (#{quote_identifier(op[:name])})"]
14: else
15: super(table, op)
16: end
17: else
18: super(table, op)
19: end
20: end
Return Sequel::JDBC::H2::Dataset object with the given opts.
# File lib/sequel_core/adapters/jdbc/h2.rb, line 23
23: def dataset(opts=nil)
24: Sequel::JDBC::H2::Dataset.new(self, opts)
25: end