Rewrite sql formatter script and shove it into examples until more tested
[dbsrgits/SQL-Abstract.git] / examples / dbic-console.pl
1 #!/sur/bin/env perl
2
3 use warnings;
4 use strict;
5
6 use DBIx::Class::Storage::Debug::PrettyPrint;
7
8 my $pp = DBIx::Class::Storage::Debug::PrettyPrint->new({
9    profile => 'console',
10    show_progress => 1,
11 });
12
13 $pp->txn_begin;
14 $pp->query_start("SELECT a, b, c FROM foo WHERE foo.a =1 and foo.b LIKE ?", q('station'));
15 sleep 1;
16 $pp->query_end("SELECT a, b, c FROM foo WHERE foo.a =1 and foo.b LIKE ?", q('station'));
17 $pp->txn_commit;
18