Class: Ardb::Adapter::Base
- Inherits:
-
Object
- Object
- Ardb::Adapter::Base
show all
- Defined in:
- lib/ardb/adapter/base.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize ⇒ Base
Returns a new instance of Base.
7
8
9
10
|
# File 'lib/ardb/adapter/base.rb', line 7
def initialize
@config_settings = Ardb.config.db_settings
@database = Ardb.config.db.database
end
|
Instance Attribute Details
#config_settings ⇒ Object
Returns the value of attribute config_settings.
5
6
7
|
# File 'lib/ardb/adapter/base.rb', line 5
def config_settings
@config_settings
end
|
#database ⇒ Object
Returns the value of attribute database.
5
6
7
|
# File 'lib/ardb/adapter/base.rb', line 5
def database
@database
end
|
Instance Method Details
#==(other_adapter) ⇒ Object
28
29
30
|
# File 'lib/ardb/adapter/base.rb', line 28
def ==(other_adapter)
self.class == other_adapter.class
end
|
#create_db(*args) ⇒ Object
15
|
# File 'lib/ardb/adapter/base.rb', line 15
def create_db(*args); raise NotImplementedError; end
|
#drop_db(*args) ⇒ Object
16
|
# File 'lib/ardb/adapter/base.rb', line 16
def drop_db(*args); raise NotImplementedError; end
|
#drop_tables(*args) ⇒ Object
18
|
# File 'lib/ardb/adapter/base.rb', line 18
def drop_tables(*args); raise NotImplementedError; end
|
#foreign_key_add_sql(*args) ⇒ Object
12
|
# File 'lib/ardb/adapter/base.rb', line 12
def foreign_key_add_sql(*args); raise NotImplementedError; end
|
#foreign_key_drop_sql(*args) ⇒ Object
13
|
# File 'lib/ardb/adapter/base.rb', line 13
def foreign_key_drop_sql(*args); raise NotImplementedError; end
|
#load_schema ⇒ Object
20
21
22
23
24
25
26
|
# File 'lib/ardb/adapter/base.rb', line 20
def load_schema
current_stdout = $stdout.dup
$stdout = File.new('/dev/null', 'w')
load Ardb.config.schema_path
$stdout = current_stdout
end
|