class Apartment::Adapters::JDBCPostgresqlAdapter

Default adapter when not using Postgresql Schemas

Private Instance Methods

create_tenant_command(conn, tenant) click to toggle source
# File lib/apartment/adapters/jdbc_postgresql_adapter.rb, line 26
def create_tenant_command(conn, tenant)
  conn.create_database(environmentify(tenant), thisisahack: '')
end
multi_tenantify_with_tenant_db_name(config, tenant) click to toggle source
# File lib/apartment/adapters/jdbc_postgresql_adapter.rb, line 22
def multi_tenantify_with_tenant_db_name(config, tenant)
  config[:url] = "#{config[:url].gsub(%r{(\S+)/.+$}, '\1')}/#{environmentify(tenant)}"
end
rescue_from() click to toggle source
# File lib/apartment/adapters/jdbc_postgresql_adapter.rb, line 30
def rescue_from
  ActiveRecord::JDBCError
end