Changeset 86bc3cc2774d9bff0dc6acf1083ca266d184b9e6 in xas-model


Ignore:
Timestamp:
06/05/15 10:05:33 (4 years ago)
Author:
Kevin L. Esteb <kevin@…>
Branches:
master
Children:
5e360ea56aab6a651e9a9576162a1b754f1c3c3c
Parents:
ec669f7d855f211d1a774ab3048a0a59d4356f13
git-author:
Kevin L. Esteb <kevin@…> (06/05/15 10:05:33)
git-committer:
Kevin L. Esteb <kevin@…> (06/05/15 10:05:33)
Message:

Updated documentation

Location:
trunk/lib/XAS/Model
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/XAS/Model/Database.pm

    r0faedb747c77b2da4f5aa97abc381a4984c861a7 r86bc3cc2774d9bff0dc6acf1083ca266d184b9e6  
    237237'ActOther' that refers to the module. 
    238238 
    239 =over 4 
    240  
    241 =item Warning 
    242  
    243 If you have multiple tables named the same thing in differant schemas 
    244 and load all the schemas at once, this constant will refer to the last 
    245 loaded table defination. 
    246  
    247 =back 
     239B<WARNING> 
     240 
     241    If you have multiple tables named the same thing in differant schemas 
     242    and load all the schemas at once, this constant will refer to the last 
     243    loaded table defination. 
    248244 
    249245=head2 tables 
     
    274270=over 4 
    275271 
    276 =item L<https://metacpan.org/pod/DBIx::Class|DBIx::Class> 
    277  
    278272=item L<XAS|XAS> 
     273 
     274=item L<DBIx::Class|https://metacpan.org/pod/DBIx::Class> 
    279275 
    280276=back 
  • trunk/lib/XAS/Model/Schema.pm

    r323d6f65ede8fb9dfe83302ba025ddd52d41e96d r86bc3cc2774d9bff0dc6acf1083ca266d184b9e6  
    1731731; 
    174174 
     175__END__ 
     176 
     177=head1 NAME 
     178 
     179XAS::Model::Schema - A class for the XAS environment 
     180 
     181=head1 SYNOPSIS 
     182 
     183 use XAS::Model::Schema; 
     184 use XAS::Mode::Database; 
     185 
     186 XAS::Model::Database->schema('XAS::Model::Database::Testing'); 
     187 my $schema = XAS::Model::Schema->opendb('testing'); 
     188 
     189=head1 DESCRIPTION 
     190 
     191This module loads database connection information from a file. This 
     192file may be located in the users home directory or in the XAS config directory. 
     193With the usual convention of the user specific file will override the global 
     194generic file. This file is named database.ini. 
     195 
     196Format of the configuration file is as follows: 
     197 
     198 [progress]             - corresponds to what is given to opendb() 
     199 dbname = monitor       - name of the database 
     200 dsn = SQLite           - corresponds to the dbd driver 
     201 user = username        - the user context to use 
     202 password = password    - the password for that context 
     203 
     204When using ODBC with a user level DSN or a dynamic connection, you 
     205should add the following items: 
     206 
     207 driver = SQL Server 
     208 server = localhost,1234 - (host,port) 
     209 
     210When using PostgresSQL (Pg), you can add the following items: 
     211 
     212 port = 5432 
     213 host = localhost 
     214 sslmode = something 
     215 options = something 
     216 
     217Or a service name, which is not compatible with the above. 
     218 
     219 service = service name 
     220 
     221There can be multiple stanzas, the first one that matches is used. 
     222 
     223=head1 METHODS 
     224 
     225=head2 opendb($database) 
     226 
     227This method makes the connection to the database. It takes these parameters: 
     228 
     229=over 4 
     230 
     231=item B<$database> 
     232 
     233The name of the database. This is defined in the database.ini file. 
     234 
     235=back 
     236 
     237=head2 dbix_exceptions($error) 
     238 
     239This method converts the internal DBIx::Class exceptions into a XAS exception. 
     240It takes these parameters: 
     241 
     242=over 4 
     243 
     244=item B<$error> 
     245 
     246The error string supplied by DBIx::Class 
     247 
     248=back 
     249 
     250=head2 filter_loaded_credentials($class, $config, $connect_args) 
     251 
     252This method is an override for the one provided by L<DBIx::Class::Schema::Config|https://metacpan.org/pod/DBIx::Class::Schema::Config>. 
     253It sets various defaults to be used when connecting to certain databases. 
     254There are defaults for SQLite, PostgreSQL and ODBC connections. The following 
     255parameters are supplied from DBIx::Class::Schema::Config. 
     256 
     257=over 4 
     258 
     259=item B<$class> 
     260 
     261=item B<$config> 
     262 
     263=item B<$connecti_args> 
     264 
     265=back 
     266 
     267=head1 SEE ALSO 
     268 
     269=over 4 
     270 
     271=item L<XAS|XAS> 
     272 
     273=item L<DBIx::Class::Schema::Config|https://metacpan.org/pod/DBIx::Class::Schema::Config> 
     274 
     275=back 
     276 
     277=head1 AUTHOR 
     278 
     279Kevin L. Esteb, E<lt>kevin@kesteb.usE<gt> 
     280 
     281=head1 COPYRIGHT AND LICENSE 
     282 
     283Copyright (c) 2014 Kevin L. Esteb 
     284 
     285This library is free software; you can redistribute it and/or modify 
     286it under the same terms as Perl itself, either Perl version 5.8.8 or, 
     287at your option, any later version of Perl 5 you may have available. 
     288 
     289See L<http://dev.perl.org/licenses/> for more information. 
     290 
     291=cut 
     292 
Note: See TracChangeset for help on using the changeset viewer.