/[SQLSession]/trunk/lib/SQLSession/Bootstrap.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

Diff of /trunk/lib/SQLSession/Bootstrap.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 4 by dpavlin, Sat Dec 2 13:10:08 2006 UTC revision 15 by dpavlin, Sun Dec 3 14:01:53 2006 UTC
# Line 21  sub run { Line 21  sub run {
21                  dsn => 'DBI:Pg:dbname=test',                  dsn => 'DBI:Pg:dbname=test',
22          );          );
23    
24          my $p = SQLSession::Model::Page->new(current_user => $system_user);          my $q = SQLSession::Model::Query->new(current_user => $system_user);
25          $p->create(          $q->create(
26                  name => 'test query',                  name => 'test query',
27                  sql_query => 'select * from a;',                  sql_query => 'select * from a;',
28                  on_database => $db,                  on_database => $db,
29          );          );
30    
31            $q->create(
32                    name => 'All films',
33                    sql_query => 'select * from film',
34                    on_database => $db->create(
35                            name => 'Pagila sample database',
36                            dsn => 'DBI:Pg:dbname=pagila',
37                    ),
38            );
39    
40  }  }
41    
42  1;  1;

Legend:
Removed from v.4  
changed lines
  Added in v.15

  ViewVC Help
Powered by ViewVC 1.1.26