mirror of
https://github.com/DBD-SQLite/DBD-SQLite
synced 2025-06-07 22:28:47 -04:00
Final tweaks for the new release
This commit is contained in:
parent
4a17a5b8c8
commit
c2f8f58179
3 changed files with 37 additions and 16 deletions
2
Changes
2
Changes
|
@ -20,6 +20,8 @@ Changes for Perl extension DBD-SQLite
|
||||||
- Replaced imp_dbh->in_tran with sqlite3_get_autocommit(), hoping
|
- Replaced imp_dbh->in_tran with sqlite3_get_autocommit(), hoping
|
||||||
this would fix the annoying rollback issues, including #48393
|
this would fix the annoying rollback issues, including #48393
|
||||||
(ISHIGAKI)
|
(ISHIGAKI)
|
||||||
|
- META.yml requires is now generated instead of being derived from the
|
||||||
|
(incorrect) PREREQ_PM values by ExtUtils::MakeMaker (ADAMK)
|
||||||
|
|
||||||
1.26_02 Fri 19 Jun 2009
|
1.26_02 Fri 19 Jun 2009
|
||||||
- Updated to SQLite 3.6.15 (DUNCAND)
|
- Updated to SQLite 3.6.15 (DUNCAND)
|
||||||
|
|
22
Makefile.PL
22
Makefile.PL
|
@ -202,6 +202,7 @@ WriteMakefile(
|
||||||
ABSTRACT => 'Self Contained SQLite RDBMS in a DBI Driver',
|
ABSTRACT => 'Self Contained SQLite RDBMS in a DBI Driver',
|
||||||
VERSION_FROM => 'lib/DBD/SQLite.pm',
|
VERSION_FROM => 'lib/DBD/SQLite.pm',
|
||||||
PREREQ_PM => {
|
PREREQ_PM => {
|
||||||
|
'Tie::Hash' => 0,
|
||||||
'File::Spec' => (WINLIKE ? '3.27' : '0.82'),
|
'File::Spec' => (WINLIKE ? '3.27' : '0.82'),
|
||||||
'DBI' => $DBI_required,
|
'DBI' => $DBI_required,
|
||||||
'Test::More' => '0.42',
|
'Test::More' => '0.42',
|
||||||
|
@ -216,19 +217,32 @@ WriteMakefile(
|
||||||
LICENSE => 'perl',
|
LICENSE => 'perl',
|
||||||
),
|
),
|
||||||
OPTIONAL( '6.11',
|
OPTIONAL( '6.11',
|
||||||
AUTHOR => 'Adam Kennedy <adamk@cpan.org>', # Release manager (can this be an array?)
|
# Release manager (can this be an array?)
|
||||||
|
AUTHOR => 'Adam Kennedy <adamk@cpan.org>',
|
||||||
),
|
),
|
||||||
OPTIONAL( '6.46',
|
OPTIONAL( '6.46',
|
||||||
META_MERGE => {
|
# Use META_ADD instead of META_MERGE so that we can remove
|
||||||
|
# any build-time dependencies that MakeMaker will put into
|
||||||
|
# the requires field.
|
||||||
|
META_ADD => {
|
||||||
configure_requires => {
|
configure_requires => {
|
||||||
'ExtUtils::MakeMaker' => '6.48',
|
'ExtUtils::MakeMaker' => '6.48',
|
||||||
'File::Spec' => '0.82', # This is not allowed to be computed
|
# This is not allowed to be computed
|
||||||
|
'File::Spec' => '0.82',
|
||||||
'DBI' => $DBI_required,
|
'DBI' => $DBI_required,
|
||||||
},
|
},
|
||||||
build_requires => {
|
build_requires => {
|
||||||
'File::Spec' => (WINLIKE ? '3.27' : '0.82'),
|
'File::Spec' => (WINLIKE ? '3.27' : '0.82'),
|
||||||
'Test::More' => '0.42',
|
'Test::More' => '0.42',
|
||||||
# 'Test::NoWarnings' => '0.081', # Bundled in /inc
|
# Bundled in /inc
|
||||||
|
# 'Test::NoWarnings' => '0.081',
|
||||||
|
},
|
||||||
|
requires => {
|
||||||
|
'Tie::Hash' => 0,
|
||||||
|
'DBI' => $DBI_required,
|
||||||
|
( WINLIKE ? (
|
||||||
|
'Win32' => '0.30',
|
||||||
|
) : () ),
|
||||||
},
|
},
|
||||||
resources => {
|
resources => {
|
||||||
license => 'http://dev.perl.org/licenses/',
|
license => 'http://dev.perl.org/licenses/',
|
||||||
|
|
|
@ -22,17 +22,14 @@ BEGIN {
|
||||||
|
|
||||||
# sqlite_version cache
|
# sqlite_version cache
|
||||||
$sqlite_version = undef;
|
$sqlite_version = undef;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
__PACKAGE__->bootstrap($VERSION);
|
__PACKAGE__->bootstrap($VERSION);
|
||||||
|
|
||||||
tie %COLLATION, 'DBD::SQLite::_WriteOnceHash';
|
tie %COLLATION, 'DBD::SQLite::_WriteOnceHash';
|
||||||
$COLLATION{perl} = sub { $_[0] cmp $_[1] };
|
$COLLATION{perl} = sub { $_[0] cmp $_[1] };
|
||||||
$COLLATION{perllocale} = sub { use locale; $_[0] cmp $_[1] };
|
$COLLATION{perllocale} = sub { use locale; $_[0] cmp $_[1] };
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
my $methods_are_installed;
|
my $methods_are_installed;
|
||||||
|
|
||||||
sub driver {
|
sub driver {
|
||||||
|
@ -70,8 +67,6 @@ sub CLONE {
|
||||||
undef $drh;
|
undef $drh;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
package DBD::SQLite::dr;
|
package DBD::SQLite::dr;
|
||||||
|
|
||||||
sub connect {
|
sub connect {
|
||||||
|
@ -617,8 +612,9 @@ e.g., "2.8.0". Can only be read.
|
||||||
|
|
||||||
=item unicode
|
=item unicode
|
||||||
|
|
||||||
If set to a true value, B<DBD::SQLite> will turn the UTF-8 flag on for all text
|
If set to a true value, B<DBD::SQLite> will turn the UTF-8 flag on for all
|
||||||
strings coming out of the database (this feature is currently disabled for perl < 5.8.5). For more details on the UTF-8 flag see
|
text strings coming out of the database (this feature is currently disabled
|
||||||
|
for perl < 5.8.5). For more details on the UTF-8 flag see
|
||||||
L<perlunicode>. The default is for the UTF-8 flag to be turned off.
|
L<perlunicode>. The default is for the UTF-8 flag to be turned off.
|
||||||
|
|
||||||
Also note that due to some bizarreness in SQLite's type system (see
|
Also note that due to some bizarreness in SQLite's type system (see
|
||||||
|
@ -641,7 +637,12 @@ Defining the column type as C<BLOB> in the DDL is B<not> sufficient.
|
||||||
|
|
||||||
=head1 DRIVER PRIVATE METHODS
|
=head1 DRIVER PRIVATE METHODS
|
||||||
|
|
||||||
The following methods can be called via the func() method with a little tweak, but the use of func() method is now discouraged by the L<DBI> author for various reasons (see DBI's document L<http://search.cpan.org/dist/DBI/lib/DBI/DBD.pm#Using_install_method()_to_expose_driver-private_methods> for details). So, if you're using L<DBI> >= 1.608, use these C<sqlite_> methods. If you need to use an older L<DBI>, you can call these like this:
|
The following methods can be called via the func() method with a little
|
||||||
|
tweak, but the use of func() method is now discouraged by the L<DBI> author
|
||||||
|
for various reasons (see DBI's document
|
||||||
|
L<http://search.cpan.org/dist/DBI/lib/DBI/DBD.pm#Using_install_method()_to_expose_driver-private_methods>
|
||||||
|
for details). So, if you're using L<DBI> >= 1.608, use these C<sqlite_>
|
||||||
|
methods. If you need to use an older L<DBI>, you can call these like this:
|
||||||
|
|
||||||
$dbh->func( ..., "(method name without sqlite_ prefix)" );
|
$dbh->func( ..., "(method name without sqlite_ prefix)" );
|
||||||
|
|
||||||
|
@ -1259,14 +1260,17 @@ with B<DBD::SQLite> and use the supplied C<sqlite> command line tool.
|
||||||
|
|
||||||
=head1 FUNCTIONS AND BIND PARAMETERS
|
=head1 FUNCTIONS AND BIND PARAMETERS
|
||||||
|
|
||||||
As of this writing, a SQL that compares a return value of a function with a numeric bind value like this doesn't work as you might expect.
|
As of this writing, a SQL that compares a return value of a function with a
|
||||||
|
numeric bind value like this doesn't work as you might expect.
|
||||||
|
|
||||||
my $sth = $dbh->prepare(q{
|
my $sth = $dbh->prepare(q{
|
||||||
SELECT bar FROM foo GROUP BY bar HAVING count(*) > ?;
|
SELECT bar FROM foo GROUP BY bar HAVING count(*) > ?;
|
||||||
});
|
});
|
||||||
$sth->execute(5);
|
$sth->execute(5);
|
||||||
|
|
||||||
This is because DBD::SQLite assumes that all the bind values are text (and should be quoted) by default. Thus the above statement becomes like this while executing:
|
This is because DBD::SQLite assumes that all the bind values are text (and
|
||||||
|
should be quoted) by default. Thus the above statement becomes like this
|
||||||
|
while executing:
|
||||||
|
|
||||||
SELECT bar FROM foo GROUP BY bar HAVING count(*) > "5";
|
SELECT bar FROM foo GROUP BY bar HAVING count(*) > "5";
|
||||||
|
|
||||||
|
@ -1276,7 +1280,8 @@ There are two workarounds for this.
|
||||||
|
|
||||||
=item Use bind_param() explicitly
|
=item Use bind_param() explicitly
|
||||||
|
|
||||||
As shown above in the C<BLOB> section, you can always use C<bind_param()> to tell the type of a bind value.
|
As shown above in the C<BLOB> section, you can always use C<bind_param()> to
|
||||||
|
tell the type of a bind value.
|
||||||
|
|
||||||
use DBI qw(:sql_types); # Don't forget this
|
use DBI qw(:sql_types); # Don't forget this
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue