Methods
- A
- C
- D
- E
- I
- M
- N
- P
- S
Attributes
[RW] | connection | |
[R] | version |
Class Public methods
new(conn)
Link
Instance Public methods
add(table_name)
Link
Add internal cache for table with table_name
.
clear!()
Link
Clears out internal caches
clear_data_source_cache!(name)
Link
Clear out internal caches for the data source name
.
columns(table_name)
Link
Get the columns for a table
columns_hash(table_name)
Link
Get the columns for a table as a hash, key is the column name value is the column object.
data_source_exists?(name)
Link
A cached lookup for table existence.
data_sources(name)
Link
encode_with(coder)
Link
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 26 def encode_with(coder) coder["columns"] = @columns coder["columns_hash"] = @columns_hash coder["primary_keys"] = @primary_keys coder["data_sources"] = @data_sources coder["version"] = connection.migration_context.current_version end
init_with(coder)
Link
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 34 def init_with(coder) @columns = coder["columns"] @columns_hash = coder["columns_hash"] @primary_keys = coder["primary_keys"] @data_sources = coder["data_sources"] @version = coder["version"] end
initialize_dup(other)
Link
marshal_dump()
Link
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 101 def marshal_dump # if we get current version during initialization, it happens stack over flow. @version = connection.migration_context.current_version [@version, @columns, @columns_hash, @primary_keys, @data_sources] end
marshal_load(array)
Link
primary_keys(table_name)
Link