Sha256: a5061e151ca70eb69f3e1c278dcf29a57503bfaf90a8d2ed7f3c2ba15160ac95
Contents?: true
Size: 468 Bytes
Versions: 11
Compression:
Stored size: 468 Bytes
Contents
class Baza::Driver::Pg::Indexes attr_reader :db def initialize(args) @db = args.fetch(:db) end def create_index(index_list, args = {}) sqls = Baza::Driver::Pg::CreateIndexSqlCreator.new(db: db, indexes: index_list, create_args: args, on_table: args.fetch(:table_name)).sqls unless args[:return_sql] db.transaction do sqls.each do |sql| db.query(sql) end end end sqls if args[:return_sql] end end
Version data entries
11 entries across 11 versions & 1 rubygems