| Acme-BeyondPerl-ToSQL documentation | Contained in the Acme-BeyondPerl-ToSQL distribution. |
Acme::BeyondPerl::ToSQL::SQLite - SQLite support for Acme::BeyondPerl::ToSQL
use Acme::BeyondPerl::ToSQL ("dbi:SQLite:dbname=acme_db","","");
# or
use Acme::BeyondPerl::ToSQL ({
dbi => ["dbi:SQLite:dbname=acme_db","",""], debug => 1,
});
This module implements a SQLite version for Acme::BeyondPerl::ToSQL. You don't need to use this module directly.
SQLite
Makamaka Hannyaharamitu, <makamaka[at]cpan.org>
Copyright 2005 by Makamaka Hannyaharamitu
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| Acme-BeyondPerl-ToSQL documentation | Contained in the Acme-BeyondPerl-ToSQL distribution. |
package Acme::BeyondPerl::ToSQL::SQLite; use strict; use base qw(Acme::BeyondPerl::ToSQL); our $VERSION = 0.01; my $OPs = { '+' => sub { shift->add(@_) }, '-' => sub { shift->sub(@_) }, '*' => sub { shift->mul(@_) }, '/' => sub { shift->div(@_) }, '%' => sub { shift->mod(@_) }, 'abs' => sub { shift->abs(@_) }, '<<' => sub { shift->lshift(@_) }, '>>' => sub { shift->rshift(@_) }, '&' => sub { shift->and(@_) }, '|' => sub { shift->or(@_) }, }; sub ops { return $OPs; } ############################################################################## # ############################################################################## package Acme::BeyondPerl::ToSQL::SQLite::__Integer; use base qw(Acme::BeyondPerl::ToSQL::SQLite); sub as_sql { sprintf("%.1f", ${$_[0]}); } ############################################################################## # ############################################################################## package Acme::BeyondPerl::ToSQL::SQLite::__Float; use base qw(Acme::BeyondPerl::ToSQL::SQLite); use strict; sub as_sql { sprintf("%.16f", ${$_[0]}); } ############################################################################## 1; __END__