Module Sequel::SchemaCaching
In: lib/sequel/extensions/schema_caching.rb

Methods

Public Instance methods

Dump the cached schema to the filename given in Marshal format.

[Source]

    # File lib/sequel/extensions/schema_caching.rb, line 48
48:     def dump_schema_cache(file)
49:       File.open(file, 'wb'){|f| f.write(Marshal.dump(@schemas))}
50:       nil
51:     end

Dump the cached schema to the filename given unless the file already exists.

[Source]

    # File lib/sequel/extensions/schema_caching.rb, line 55
55:     def dump_schema_cache?(file)
56:       dump_schema_cache(file) unless File.exist?(file)
57:     end

Replace the schema cache with the data from the given file, which should be in Marshal format.

[Source]

    # File lib/sequel/extensions/schema_caching.rb, line 61
61:     def load_schema_cache(file)
62:       @schemas = Marshal.load(File.read(file))
63:       nil
64:     end

Replace the schema cache with the data from the given file if the file exists.

[Source]

    # File lib/sequel/extensions/schema_caching.rb, line 68
68:     def load_schema_cache?(file)
69:       load_schema_cache(file) if File.exist?(file)
70:     end

[Validate]