Changeset 632bca7e13318d039e389ab17a8895c28e057a0e in xas-model


Ignore:
Timestamp:
12/16/15 15:36:16 (4 years ago)
Author:
Kevin L. Esteb <kevin@…>
Branches:
master
Children:
ecc7684e8ed4b6ecb7ee9e54677bb0990df7d418
Parents:
aca764b3607fd2bc628f149bd387fb885b32b4e1
git-author:
Kevin L. Esteb <kevin@…> (12/16/15 15:36:16)
git-committer:
Kevin L. Esteb <kevin@…> (12/16/15 15:36:16)
Message:

updating documentation

Location:
trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/bin/xas-pg-extract-data

    r5250ce3bd7dfd5e59c99936400210013b992b151 r632bca7e13318d039e389ab17a8895c28e057a0e  
    3232 
    3333use lib "../lib"; 
    34 use XAS::Apps::Base::ExtractData; 
     34use XAS::Apps::Database::ExtractData; 
    3535 
    3636main: { 
    3737 
    38     my $app = XAS::Apps::Base::ExtractData->new( 
    39         -throws  => 'pg_extract_data', 
     38    my $app = XAS::Apps::Database::ExtractData->new( 
     39        -throws  => 'xas-pg-extract-data', 
    4040    ); 
    4141 
  • trunk/bin/xas-pg-extract-global

    r5250ce3bd7dfd5e59c99936400210013b992b151 r632bca7e13318d039e389ab17a8895c28e057a0e  
    3232 
    3333use lib "../lib"; 
    34 use XAS::Apps::Base::ExtractGlobals; 
     34use XAS::Apps::Database::ExtractGlobals; 
    3535 
    3636main: { 
    3737 
    38     my $app = XAS::Apps::Base::ExtractGlobals->new( 
    39         -throws  => 'pg_extract_global', 
     38    my $app = XAS::Apps::Database::ExtractGlobals->new( 
     39        -throws  => 'xas-pg-extract-global', 
    4040    ); 
    4141 
  • trunk/bin/xas-pg-remove-data

    r5250ce3bd7dfd5e59c99936400210013b992b151 r632bca7e13318d039e389ab17a8895c28e057a0e  
    3030 
    3131use lib "../lib"; 
    32 use XAS::Apps::Base::RemoveData; 
     32use XAS::Apps::Database::RemoveData; 
    3333 
    3434main: { 
    3535     
    36     my $app = XAS::Apps::Base::RemoveData->new( 
    37         -throws  => 'pg_remove_data', 
     36    my $app = XAS::Apps::Database::RemoveData->new( 
     37        -throws  => 'xas-pg-remove-data', 
    3838    ); 
    3939 
  • trunk/lib/XAS/Apps/Database/ExtractData.pm

    r5e360ea56aab6a651e9a9576162a1b754f1c3c3c r632bca7e13318d039e389ab17a8895c28e057a0e  
    5858    my $self = shift; 
    5959 
    60     $self->{file}   = ''; 
    61     $self->{table}  = ''; 
    62     $self->{schema} = ''; 
     60    $self->{'file'}   = ''; 
     61    $self->{'table'}  = ''; 
     62    $self->{'schema'} = ''; 
    6363 
    6464    return { 
    65         'file=s'   => \$self->{file}, 
    66         'table=s'  => \$self->{table}, 
    67         'schema=s' => \$self->{schema}, 
     65        'file=s'   => \$self->{'file'}, 
     66        'table=s'  => \$self->{'table'}, 
     67        'schema=s' => \$self->{'schema'}, 
    6868    }; 
    6969 
     
    119119=over 4 
    120120 
    121 =item bin/xas-pg-extract-data 
     121=item L<XAS::Model|XAS::Model> 
    122122 
    123123=item L<XAS|XAS> 
     
    131131=head1 COPYRIGHT AND LICENSE 
    132132 
    133 Copyright (c) 2012 by Kevin L. Esteb 
     133Copyright (c) 2012-2015 by Kevin L. Esteb 
    134134 
    135135This is free software; you can redistribute it and/or modify it under 
  • trunk/lib/XAS/Apps/Database/ExtractGlobals.pm

    r5e360ea56aab6a651e9a9576162a1b754f1c3c3c r632bca7e13318d039e389ab17a8895c28e057a0e  
    5656    my $self = shift; 
    5757 
    58     $self->{file} = ''; 
    59     $self->{database} = ''; 
     58    $self->{'file'} = ''; 
     59    $self->{'database'} = ''; 
    6060 
    6161    return { 
    62         'file=s'     => \$self->{file}, 
    63         'database=s' => \$self->{database}, 
     62        'file=s'     => \$self->{'file'}, 
     63        'database=s' => \$self->{'database'}, 
    6464    }; 
    6565 
     
    111111=over 4 
    112112 
    113 =item bin/xas-pg-extract-global 
     113=item L<XAS::Model|XAS::Model> 
    114114 
    115115=item L<XAS|XAS> 
     
    123123=head1 COPYRIGHT AND LICENSE 
    124124 
    125 Copyright (C) 2012 by Kevin L. Esteb 
     125Copyright (c) 2012-2015 by Kevin L. Esteb 
    126126 
    127127This is free software; you can redistribute it and/or modify it under 
  • trunk/lib/XAS/Apps/Database/RemoveData.pm

    r5e360ea56aab6a651e9a9576162a1b754f1c3c3c r632bca7e13318d039e389ab17a8895c28e057a0e  
    8686=head1 DESCRIPTION 
    8787 
    88 This module will strip the "copy" statements from a PostgreSQL pg_dumpall file.  
     88This module will strip the "copy" statements from a PostgreSQL pg_dumpall file. 
    8989Thus producing a schema that is suitable to rebuild an "empty" database. 
    90 It inherits from L<XAS::Lib::App>. Please see that module for additional  
    91 documentation. 
     90It inherits from L<XAS::Lib::App|XAS::Lib::App>. Please see that module for  
     91additional documentation. 
    9292 
    9393=head1 OPTIONS 
     
    103103=over 4 
    104104 
    105 =item bin/xas-pg-remove-data 
     105=item L<XAS::Model|XAS::Model> 
    106106 
    107107=item L<XAS|XAS> 
     
    115115=head1 COPYRIGHT AND LICENSE 
    116116 
    117 Copyright (C) 2012 by Kevin L. Esteb 
     117Copyright (c) 2012-2015 by Kevin L. Esteb 
    118118 
    119119This is free software; you can redistribute it and/or modify it under 
  • trunk/lib/XAS/Apps/Database/Schema.pm

    r5e360ea56aab6a651e9a9576162a1b754f1c3c3c r632bca7e13318d039e389ab17a8895c28e057a0e  
    4646    my $self = shift; 
    4747 
    48     $self->{dbtype}    = 'SQLite'; 
    49     $self->{revision}  = '0.01'; 
    50     $self->{directory} = './sql/'; 
    51     $self->{database}  = 'testing'; 
    52     $self->{schema}    = 'XAS::Model::Database::Testing'; 
     48    $self->{'dbtype'}    = 'SQLite'; 
     49    $self->{'revision'}  = '0.01'; 
     50    $self->{'directory'} = './sql/'; 
     51    $self->{'database'}  = 'testing'; 
     52    $self->{'schema'}    = 'XAS::Model::Database::Testing'; 
    5353 
    5454    return { 
    55         'dbtype=s'    => \$self->{dbtype}, 
    56         'revision=s'  => \$self->{revision}, 
    57         'directory=s' => \$self->{directory}, 
    58         'database=s'  => \$self->{database}, 
    59         'schema=s'    => \$self->{schema}, 
     55        'dbtype=s'    => \$self->{'dbtype'}, 
     56        'revision=s'  => \$self->{'revision'}, 
     57        'directory=s' => \$self->{'directory'}, 
     58        'database=s'  => \$self->{'database'}, 
     59        'schema=s'    => \$self->{'schema'}, 
    6060    }; 
    6161 
     
    8585 
    8686This module will create a schema for the XAS database. It inherits from 
    87 L<XAS::Lib::App|XAS::Lib::App>. Please see that module for additional documentation. 
     87L<XAS::Lib::App|XAS::Lib::App>. Please see that module for additional  
     88documentation. 
    8889 
    8990=head1 OPTIONS 
     
    113114=over 4 
    114115 
    115 =item bin/xas-create-schema 
     116=item L<XAS::Model|XAS::Model> 
    116117 
    117118=item L<XAS|XAS> 
     
    125126=head1 COPYRIGHT AND LICENSE 
    126127 
    127 Copyright (C) 2012 by Kevin L. Esteb 
     128Copyright (c) 2012-2015 by Kevin L. Esteb 
    128129 
    129130This is free software; you can redistribute it and/or modify it under 
  • trunk/lib/XAS/Model.pm

    rfea50aedbe0721f6986ed32d5ccce85ae7e546d9 r632bca7e13318d039e389ab17a8895c28e057a0e  
    1313=head1 DESCRIPTION 
    1414 
    15 The database abstraction layer is built upon L<https://metacpan.org/pod/DBIx::Class|DBIx::Class>  
     15The database abstraction layer is built upon L<DBIx::Class|https://metacpan.org/pod/DBIx::Class>  
    1616which is robust ORM for Perl. The modules provided try to make working with  
    1717databases easier. 
     18 
     19=head2 xas-create-schema 
     20 
     21This procedure will create a database schema. by default this is for SQLite.  
     22Others databases may be defined on the command line. 
     23 
     24=head2 xas-pg-extract-data 
     25 
     26This procedure will extract the data from a PostgreSQL dump file. This is done 
     27by table, which can be defined on the command line. 
     28 
     29=head2 xas-pg-extract-global 
     30 
     31This procedure will extract global data from a PostgreSQL dump file. 
     32 
     33=head2 xas-pg-remove-data 
     34 
     35This procedure will remove the data elements from a PostgreSQL dump file. This 
     36is usefull to recreate the database schema. 
    1837 
    1938=head1 SEE ALSO 
    2039 
    2140=over 4 
    22  
    23 =item L<XAS|XAS> 
    2441 
    2542=item L<XAS::Model::Database|XAS::Model::Database> 
     
    3754=item L<XAS::Apps::Database::Schema|XAS::Apps::Database::Schema> 
    3855 
     56=item L<XAS|XAS> 
     57 
    3958=back 
    4059 
     
    4564=head1 COPYRIGHT AND LICENSE 
    4665 
    47 Copyright (C) 2014 Kevin L. Esteb 
     66Copyright (c) 2012-2015 Kevin L. Esteb 
    4867 
    4968This is free software; you can redistribute it and/or modify it under 
  • trunk/lib/XAS/Model/DBM.pm

    r5e360ea56aab6a651e9a9576162a1b754f1c3c3c r632bca7e13318d039e389ab17a8895c28e057a0e  
    661661=over 4 
    662662 
     663=item L<XAS::Model|XAS::Model> 
     664 
     665=item L<XAS|XAS> 
     666 
    663667=item <https://metacpan.org/pod/DBIx::Class|DBIx::Class> 
    664668 
    665 =item L<XAS|XAS> 
    666  
    667669=back 
    668670 
     
    673675=head1 COPYRIGHT AND LICENSE 
    674676 
    675 Copyright (c) 2014 Kevin L. Esteb 
     677Copyright (c) 2012-2015 Kevin L. Esteb 
    676678 
    677679This is free software; you can redistribute it and/or modify it under 
  • trunk/lib/XAS/Model/Database.pm

    raa72a99aecfa74827a4ed9ede305c63845259076 r632bca7e13318d039e389ab17a8895c28e057a0e  
    187187=head1 DESCRIPTION 
    188188 
    189 This module loads DBIx::Class table definations and defines a path for 
     189This module loads DBIx::Class table definitions and defines a path for 
    190190the database.ini configuration file. It can also load shortcut constants 
    191191for table definations.  
     
    214214The difference is that in the first example you are only loading the  
    215215"Master" constant into your module. The second example loads the constants  
    216 "Master" and "Detail". The ":all" qualifer would load all the defined 
     216"Master" and "Detail". The ":all" qualifier would load all the defined 
    217217constants.  
    218218 
    219219=head1 HOOKS 
    220220 
    221 The following hooks are defined to load table definations and define 
     221The following hooks are defined to load table definitions and define 
    222222constants. The order that they are called is important, i.e. 'schema' must 
    223223come before 'table'. 
     
    233233=head2 table 
    234234 
    235 This will define a constant for a table defination. This constant is based 
     235This will define a constant for a table definition. This constant is based 
    236236on the table name, which is defined by the modules name. So the module 
    237237'ETL::Model::Database::Progress::ActOther' will have a constant named 
     
    242242    If you have multiple tables named the same thing in differant schemas 
    243243    and load all the schemas at once, this constant will refer to the last 
    244     loaded table defination. 
     244    loaded table definition. 
    245245 
    246246=head2 tables 
     
    248248Does the same thing as 'table'. 
    249249 
    250 =head1 METHODS 
    251  
    252 =head2 opendb($database) 
    253  
    254 This method provides the defaults necessary to call the DBIx::Class::Schema  
    255 connect() method. It takes one parameter. 
     250=head1 SEE ALSO 
    256251 
    257252=over 4 
    258253 
    259 =item B<$database> 
    260  
    261 The name of a configuration item suitable for DBIx::Class::Schema::Configure. 
    262  
    263 Example 
    264  
    265     my $handle = XAS::Model::Database->opendb('database'); 
     254=item L<XAS::Model::Database|XAS::Model::Database> 
     255 
     256=item L<XAS::Model|XAS::Model> 
     257 
     258=item L<XAS|XAS> 
     259 
     260=item L<DBIx::Class|https://metacpan.org/pod/DBIx::Class> 
    266261 
    267262=back 
    268263 
    269 =head1 SEE ALSO 
    270  
    271 =over 4 
    272  
    273 =item L<XAS|XAS> 
    274  
    275 =item L<DBIx::Class|https://metacpan.org/pod/DBIx::Class> 
    276  
    277 =back 
    278  
    279264=head1 AUTHOR 
    280265 
     
    283268=head1 COPYRIGHT AND LICENSE 
    284269 
    285 Copyright (c) 2014 Kevin L. Esteb 
     270Copyright (c) 2012-2015 Kevin L. Esteb 
    286271 
    287272This is free software; you can redistribute it and/or modify it under 
  • trunk/lib/XAS/Model/Schema.pm

    r5e360ea56aab6a651e9a9576162a1b754f1c3c3c r632bca7e13318d039e389ab17a8895c28e057a0e  
    269269=over 4 
    270270 
     271=item L<XAS::Model|XAS::Model> 
     272 
    271273=item L<XAS|XAS> 
    272274 
     
    281283=head1 COPYRIGHT AND LICENSE 
    282284 
    283 Copyright (c) 2014 Kevin L. Esteb 
     285Copyright (c) 2012-2015 Kevin L. Esteb 
    284286 
    285287This is free software; you can redistribute it and/or modify it under 
     
    288290 
    289291=cut 
    290  
Note: See TracChangeset for help on using the changeset viewer.