Public Instance methods
dump_schema_cache(file)
Dump the cached schema to the filename given in Marshal format.
[show source]
# File lib/sequel/extensions/schema_caching.rb 53 def dump_schema_cache(file) 54 sch = dumpable_schema_cache 55 File.open(file, 'wb'){|f| f.write(Marshal.dump(sch))} 56 nil 57 end
dump_schema_cache?(file)
Dump the cached schema to the filename given unless the file already exists.
[show source]
# File lib/sequel/extensions/schema_caching.rb 61 def dump_schema_cache?(file) 62 dump_schema_cache(file) unless File.exist?(file) 63 end
load_schema_cache(file)
Replace the schema cache with the data from the given file, which should be in Marshal format.
[show source]
# File lib/sequel/extensions/schema_caching.rb 67 def load_schema_cache(file) 68 @schemas = load_schema_cache_file(file) 69 @schemas.each_value{|v| schema_post_process(v)} 70 nil 71 end
load_schema_cache?(file)
Replace the schema cache with the data from the given file if the file exists.
[show source]
# File lib/sequel/extensions/schema_caching.rb 75 def load_schema_cache?(file) 76 load_schema_cache(file) if File.exist?(file) 77 end