Module: Exwiw::Adapter

Defined in:
lib/exwiw/adapter.rb,
lib/exwiw/adapter/mysql2_adapter.rb,
lib/exwiw/adapter/mongodb_adapter.rb,
lib/exwiw/adapter/sqlite3_adapter.rb,
lib/exwiw/adapter/postgresql_adapter.rb

Defined Under Namespace

Classes: Base, MongodbAdapter, Mysql2Adapter, PostgresqlAdapter, Sqlite3Adapter

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.build(connection_config, logger) ⇒ Object



131
132
133
134
135
136
137
138
139
140
141
142
143
144
# File 'lib/exwiw/adapter.rb', line 131

def self.build(connection_config, logger)
  case connection_config.adapter
  when 'sqlite3'
    Adapter::Sqlite3Adapter.new(connection_config, logger)
  when 'mysql2'
    Adapter::Mysql2Adapter.new(connection_config, logger)
  when 'postgresql'
    Adapter::PostgresqlAdapter.new(connection_config, logger)
  when 'mongodb'
    Adapter::MongodbAdapter.new(connection_config, logger)
  else
    raise 'Unsupported adapter'
  end
end

Instance Method Details

#execute(query_ast) ⇒ Object

Raises:

  • (NotImplementedError)


115
116
117
# File 'lib/exwiw/adapter.rb', line 115

def execute(query_ast)
  raise NotImplementedError
end

#to_bulk_delete(select_query_ast, table) ⇒ Object

Raises:

  • (NotImplementedError)


127
128
129
# File 'lib/exwiw/adapter.rb', line 127

def to_bulk_delete(select_query_ast, table)
  raise NotImplementedError
end

#to_bulk_insert(results, table) ⇒ Object

Raises:

  • (NotImplementedError)


121
122
123
# File 'lib/exwiw/adapter.rb', line 121

def to_bulk_insert(results, table)
  raise NotImplementedError
end