Changeset 323d6f65ede8fb9dfe83302ba025ddd52d41e96d in xas-model


Ignore:
Timestamp:
02/18/15 10:14:09 (4 years ago)
Author:
Kevin L. Esteb <kevin@…>
Branches:
master
Children:
0e20d6d6a724f20fc2a5f11ca05c8f3a77208599
Parents:
1d087096089e999a35750d50dad3cf9f01913a9e
git-author:
Kevin L. Esteb <kevin@…> (02/18/15 10:14:09)
git-committer:
Kevin L. Esteb <kevin@…> (02/18/15 10:14:09)
Message:

Working with a taint problem

Location:
trunk
Files:
1 added
1 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/MANIFEST

    r1d087096089e999a35750d50dad3cf9f01913a9e r323d6f65ede8fb9dfe83302ba025ddd52d41e96d  
    55bin/xas-pg-remove-data 
    66Changes 
     7etc/database.ini 
    78lib/XAS/Apps/Database/Schema.pm 
    89lib/XAS/Model.pm 
  • trunk/bin/xas-create-schema

    r51eb11155a755071e75ebabf515931861e5bd0f7 r323d6f65ede8fb9dfe83302ba025ddd52d41e96d  
    1515#              --dbtype    type of database to create 
    1616#              --revision  the revision for the schema 
     17#              --schema    the database schema to load 
    1718#              --directory the directory to place the schema file 
    1819#              --help      prints out a helpful help message 
     
    4142use XAS::Apps::Database::Schema; 
    4243 
    43 $SQL::Translator::DEBUG = 1; 
    44  
    4544main: { 
    4645 
     
    6564 options: 
    6665   --dbtype     the type of database system   
     66   --schema     the database schema to load 
    6767   --revision   the revison for the schema 
    6868   --directory  the directory to place the schema file 
     
    9191 
    9292Or any other SQL::Translater database name. 
     93 
     94=item B<--schema> 
     95 
     96The database schema to load. Defaults to "XAS::Model::Database::Testing". 
    9397 
    9498=item B<--revision> 
  • trunk/lib/XAS/Apps/Database/Schema.pm

    r51eb11155a755071e75ebabf515931861e5bd0f7 r323d6f65ede8fb9dfe83302ba025ddd52d41e96d  
    11package XAS::Apps::Database::Schema; 
    22 
    3 use XAS::Model::Database 
    4   schema => 'XAS::Model::Database', 
    5   tables => ':all' 
    6 ; 
     3use XAS::Model::Schema; 
     4use XAS::Model::Database; 
    75 
    86use XAS::Class 
     
    108  version   => '0.02', 
    119  base      => 'XAS::Lib::App', 
    12   accessors => 'dbtype revision directory database db', 
     10  accessors => 'dbtype revision directory database db schema', 
    1311; 
    1412 
     
    2018    my $self = shift; 
    2119 
     20    my $schema = $self->schema; 
    2221    my $database = $self->database; 
    2322 
    24     $self->{db} = XAS::Model::Database->opendb($database); 
     23    XAS::Model::Database->schemas($schema); 
     24    $self->{db} = XAS::Model::Schema->opendb($database); 
    2525 
    2626} 
     
    4949    $self->{revision}  = '0.01'; 
    5050    $self->{directory} = './sql/'; 
    51     $self->{database}  = 'database'; 
     51    $self->{database}  = 'testing'; 
     52    $self->{schema}    = 'XAS::Model::Database::Testing'; 
    5253 
    5354    return { 
     
    5657        'directory=s' => \$self->{directory}, 
    5758        'database=s'  => \$self->{database}, 
     59        'schema=s'    => \$self->{schema}, 
    5860    }; 
    5961 
  • trunk/lib/XAS/Model/Schema.pm

    r8f14efda2486086620dae33eba4e05b4cdfa98e1 r323d6f65ede8fb9dfe83302ba025ddd52d41e96d  
    7979 
    8080sub filter_loaded_credentials { 
    81     my ($class, $config, $connect_args) = @_; 
     81    my $class        = shift; 
     82    my $config       = shift; 
     83    my $connect_args = shift; 
     84 
     85    $config = {} if ($config eq ''); 
    8286 
    8387    $config->{dbi_attr}->{AutoCommit} = 1; 
  • trunk/perl-XAS-Model.spec

    ra3992745955a19b095d8fafb21d4d30180527c0d r323d6f65ede8fb9dfe83302ba025ddd52d41e96d  
    4646%doc Changes README 
    4747%{perl_vendorlib}/* 
     48%config(noreplace) /etc/xas/database.ini 
    4849/usr/share/man/* 
    4950/usr/bin/* 
Note: See TracChangeset for help on using the changeset viewer.