1DBIx::Class::Schema::DiUfsfe:r:SCcohnetmraiDbauttae(d3D)PBeIrxl::DColcausmse:n:tSacthieomna::Diff::SchemaData(3)
2
3
4

NAME

6       DBIx::Class::Schema::Diff::SchemaDiff - Data representation of schema
7       for diffing
8

SYNOPSIS

10        use DBIx::Class::Schema::Diff::SchemaData;
11
12        my $SD = DBIx::Class::Schema::Diff::SchemaData->new(
13         schema => 'My::Schema'
14        );
15
16        $SD = DBIx::Class::Schema::Diff::SchemaData->new(
17         schema => $schema
18        );
19
20        # Get hashref representation of schema:
21        my $hashref = $SD->data;
22
23        my $SD2 = DBIx::Class::Schema::Diff::SchemaData->new(
24         data => $hashref
25        );
26
27        # Dump as JSON to file:
28        $SD2->dump_json_file('/path/to/schema_data.json');
29

DESCRIPTION

31       Object class representing a DBIx::Class::Schema. The "old_schema" and
32       "new_schema" build params in DBIx::Class::Schema::Diff are dynamically
33       coerced into objects of this class.
34
35       This class can also be instantiated directly to dump/save the current
36       schema data for later use by DBIx::Class::Schema::Diff (See its
37       SYNOPSIS).
38

METHODS

40   new
41       Create a new DBIx::Class::Schema::Diff::SchemaData instance. The
42       following build options are supported:
43
44       schema
45           DBIx::Class schema supplied as a class name or connected object
46           instance. If this param is supplied it will be used to build
47           "data".
48
49       data
50           Can be supplied instead of "schema" to use previously generated
51           data.
52
53   dump_json
54       Returns "data" as a serialized JSON string.
55
56   dump_json_file
57       Writes output of "dump_json()" to the supplied filename as long as it
58       doesn't already exists. If the file already exists, an exception is
59       thrown.
60
61   prune
62       Accepts a list of one or more prune "keywords" and returns a new
63       "SchemaData" object with the specified information pruned/stripped from
64       the "data". Currently supported prune keywords:
65
66       isa
67       constraints
68       relationships
69       columns
70       private_col_attrs
71
72   fingerprint
73       Returns a sha1-based fingerprint string of the current data. Note that
74       "prune" will result in different fingerprints. An example fingerprint
75       is "schemsum-448d754e40e09e0". The 'schemsum' prefix is just for fun
76       (and also provides an easy way to eyeball these values down the road).
77

SEE ALSO

79       ยท   DBIx::Class::Schema::Diff
80

AUTHOR

82       Henry Van Styn <vanstyn@cpan.org>
83
85       This software is copyright (c) 2014 by IntelliTree Solutions llc.
86
87       This is free software; you can redistribute it and/or modify it under
88       the same terms as the Perl 5 programming language system itself.
89
90
91
92perl v5.32.0                      2020-D0B7I-x2:8:Class::Schema::Diff::SchemaData(3)
Impressum