/[Frey]/trunk/lib/Strix/Schema.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /trunk/lib/Strix/Schema.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 169 - (hide annotations)
Tue Aug 12 22:28:26 2008 UTC (15 years, 8 months ago) by dpavlin
File size: 397 byte(s)
set client_encoding to utf-8 for PostgreSQL
1 dpavlin 2 package Strix::Schema;
2    
3     use Fey::ORM::Schema;
4 dpavlin 102 use Frey::Schema;
5 dpavlin 2
6 dpavlin 35 my $dsn = 'dbi:Pg:dbname=new';
7 dpavlin 169 #$dsn = 'dbi:SQLite:dbname=./var/strix.sqlite';
8 dpavlin 15
9 dpavlin 102 my ( $schema, $source ) = Frey::Schema->schema_source( $dsn );
10 dpavlin 2
11     has_schema $schema;
12    
13 dpavlin 143 #warn Strix::Schema->SQLFactoryClass();
14 dpavlin 57
15 dpavlin 2 __PACKAGE__->DBIManager()->add_source($source);
16 dpavlin 55
17 dpavlin 169 $source->dbh->do( qq{ set client_encoding = 'utf-8' } ) if $dsn =~ /Pg/;
18    
19 dpavlin 55 1;

  ViewVC Help
Powered by ViewVC 1.1.26