- SEE ALSO
- COPYRIGHT AND LICENSE
DBIx::Class::Schema::Diff::SchemaDiff - Data representation of schema for diffing
use DBIx::Class::Schema::Diff::SchemaData; my $SD = DBIx::Class::Schema::Diff::SchemaData->new( schema => 'My::Schema' ); $SD = DBIx::Class::Schema::Diff::SchemaData->new( schema => $schema ); # Get hashref representation of schema: my $hashref = $SD->data; my $SD2 = DBIx::Class::Schema::Diff::SchemaData->new( data => $hashref ); # Dump as JSON to file: $SD2->dump_json_file('/path/to/schema_data.json');
Object class representing a DBIx::Class::Schema. The
new_schema build params in DBIx::Class::Schema::Diff are dynamically coerced into objects of this class.
This class can also be instantiated directly to dump/save the current schema data for later use by DBIx::Class::Schema::Diff (See its SYNOPSIS).
Create a new DBIx::Class::Schema::Diff::SchemaData instance. The following build options are supported:
DBIx::Class schema supplied as a class name or connected object instance. If this param is supplied it will be used to build
Can be supplied instead of
schemato use previously generated data.
data as a serialized JSON string.
Writes output of
dump_json() to the supplied filename as long as it doesn't already exists. If the file already exists, an exception is thrown.
Accepts a list of one or more prune
keywords and returns a new
SchemaData object with the specified information pruned/stripped from the
data. Currently supported prune keywords:
Returns a sha1-based fingerprint string of the current data. Note that
prune will result in different fingerprints. An example fingerprint is
schemsum-448d754e40e09e0. The 'schemsum' prefix is just for fun (and also provides an easy way to eyeball these values down the road).
Henry Van Styn <email@example.com>
This software is copyright (c) 2014 by IntelliTree Solutions llc.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.