Class: ActiveRecord::ConnectionAdapters::BoundSchemaReflection

Inherits:
Object
  • Object
show all
Defined in:
lib/active_record/connection_adapters/schema_cache.rb

Instance Method Summary collapse

Constructor Details

#initialize(abstract_schema_reflection, connection) ⇒ BoundSchemaReflection

Returns a new instance of BoundSchemaReflection.



150
151
152
153
# File 'lib/active_record/connection_adapters/schema_cache.rb', line 150

def initialize(abstract_schema_reflection, connection)
  @schema_reflection = abstract_schema_reflection
  @connection = connection
end

Instance Method Details

#add(name) ⇒ Object



175
176
177
# File 'lib/active_record/connection_adapters/schema_cache.rb', line 175

def add(name)
  @schema_reflection.add(@connection, name)
end

#cached?(table_name) ⇒ Boolean

Returns:

  • (Boolean)


163
164
165
# File 'lib/active_record/connection_adapters/schema_cache.rb', line 163

def cached?(table_name)
  @schema_reflection.cached?(table_name)
end

#clear!Object



155
156
157
# File 'lib/active_record/connection_adapters/schema_cache.rb', line 155

def clear!
  @schema_reflection.clear!
end

#clear_data_source_cache!(name) ⇒ Object



211
212
213
# File 'lib/active_record/connection_adapters/schema_cache.rb', line 211

def clear_data_source_cache!(name)
  @schema_reflection.clear_data_source_cache!(@connection, name)
end

#columns(table_name) ⇒ Object



183
184
185
# File 'lib/active_record/connection_adapters/schema_cache.rb', line 183

def columns(table_name)
  @schema_reflection.columns(@connection, table_name)
end

#columns_hash(table_name) ⇒ Object



187
188
189
# File 'lib/active_record/connection_adapters/schema_cache.rb', line 187

def columns_hash(table_name)
  @schema_reflection.columns_hash(@connection, table_name)
end

#columns_hash?(table_name) ⇒ Boolean

Returns:

  • (Boolean)


191
192
193
# File 'lib/active_record/connection_adapters/schema_cache.rb', line 191

def columns_hash?(table_name)
  @schema_reflection.columns_hash?(@connection, table_name)
end

#data_source_exists?(name) ⇒ Boolean

Returns:

  • (Boolean)


171
172
173
# File 'lib/active_record/connection_adapters/schema_cache.rb', line 171

def data_source_exists?(name)
  @schema_reflection.data_source_exists?(@connection, name)
end

#data_sources(name) ⇒ Object



179
180
181
# File 'lib/active_record/connection_adapters/schema_cache.rb', line 179

def data_sources(name)
  @schema_reflection.data_sources(@connection, name)
end

#database_versionObject



199
200
201
# File 'lib/active_record/connection_adapters/schema_cache.rb', line 199

def database_version
  @schema_reflection.database_version(@connection)
end

#dump_to(filename) ⇒ Object



215
216
217
# File 'lib/active_record/connection_adapters/schema_cache.rb', line 215

def dump_to(filename)
  @schema_reflection.dump_to(@connection, filename)
end

#indexes(table_name) ⇒ Object



195
196
197
# File 'lib/active_record/connection_adapters/schema_cache.rb', line 195

def indexes(table_name)
  @schema_reflection.indexes(@connection, table_name)
end

#load!Object



159
160
161
# File 'lib/active_record/connection_adapters/schema_cache.rb', line 159

def load!
  @schema_reflection.load!(@connection)
end

#primary_keys(table_name) ⇒ Object



167
168
169
# File 'lib/active_record/connection_adapters/schema_cache.rb', line 167

def primary_keys(table_name)
  @schema_reflection.primary_keys(@connection, table_name)
end

#sizeObject



207
208
209
# File 'lib/active_record/connection_adapters/schema_cache.rb', line 207

def size
  @schema_reflection.size(@connection)
end

#versionObject



203
204
205
# File 'lib/active_record/connection_adapters/schema_cache.rb', line 203

def version
  @schema_reflection.version(@connection)
end