mirror of
https://github.com/DBD-SQLite/DBD-SQLite
synced 2025-06-07 22:28:47 -04:00
Preparing another test release
This commit is contained in:
parent
cc19fceb69
commit
374d4d18e5
3 changed files with 62 additions and 61 deletions
4
Changes
4
Changes
|
@ -1,5 +1,9 @@
|
||||||
Changes for Perl extension DBD-SQLite.
|
Changes for Perl extension DBD-SQLite.
|
||||||
|
|
||||||
|
1.22_06 Wed 15 Apr 2009
|
||||||
|
- Simplifying various miscellaneous code (ADAMK)
|
||||||
|
- Adding a test for non-latin filename support ()
|
||||||
|
|
||||||
1.22_05 Wed 15 Apr 2009
|
1.22_05 Wed 15 Apr 2009
|
||||||
- Hopefully the last dev release before the next production release.
|
- Hopefully the last dev release before the next production release.
|
||||||
- Updated to SQLite 3.6.13 (DUNCAND)
|
- Updated to SQLite 3.6.13 (DUNCAND)
|
||||||
|
|
|
@ -8,28 +8,29 @@ use DynaLoader ();
|
||||||
use vars qw($VERSION @ISA);
|
use vars qw($VERSION @ISA);
|
||||||
use vars qw{$err $errstr $drh $sqlite_version};
|
use vars qw{$err $errstr $drh $sqlite_version};
|
||||||
BEGIN {
|
BEGIN {
|
||||||
$VERSION = '1.22_05';
|
$VERSION = '1.22_06';
|
||||||
@ISA = ('DynaLoader');
|
@ISA = ('DynaLoader');
|
||||||
|
|
||||||
|
# Initialize errors
|
||||||
|
$err = undef;
|
||||||
|
$errstr = undef;
|
||||||
|
|
||||||
# Driver singleton
|
# Driver singleton
|
||||||
$drh = undef;
|
$drh = undef;
|
||||||
|
|
||||||
|
# sqlite_version cache
|
||||||
|
$sqlite_version = undef;
|
||||||
}
|
}
|
||||||
|
|
||||||
__PACKAGE__->bootstrap($VERSION);
|
__PACKAGE__->bootstrap($VERSION);
|
||||||
|
|
||||||
sub driver {
|
sub driver {
|
||||||
return $drh if $drh;
|
$drh or
|
||||||
my ($class, $attr) = @_;
|
$drh = DBI::_new_drh( "$_[0]::dr", {
|
||||||
|
|
||||||
$class .= "::dr";
|
|
||||||
|
|
||||||
$drh = DBI::_new_drh( $class, {
|
|
||||||
Name => 'SQLite',
|
Name => 'SQLite',
|
||||||
Version => $VERSION,
|
Version => $VERSION,
|
||||||
Attribution => 'DBD::SQLite by Matt Sergeant et al',
|
Attribution => 'DBD::SQLite by Matt Sergeant et al',
|
||||||
} );
|
} );
|
||||||
|
|
||||||
return $drh;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sub CLONE {
|
sub CLONE {
|
||||||
|
@ -82,19 +83,19 @@ sub connect {
|
||||||
package DBD::SQLite::db;
|
package DBD::SQLite::db;
|
||||||
|
|
||||||
sub prepare {
|
sub prepare {
|
||||||
my ($dbh, $statement, @attribs) = @_;
|
my $dbh = shift;
|
||||||
|
|
||||||
my $sth = DBI::_new_sth($dbh, {
|
my $sth = DBI::_new_sth( $dbh, {
|
||||||
Statement => $statement,
|
Statement => shift,
|
||||||
});
|
} );
|
||||||
|
|
||||||
DBD::SQLite::st::_prepare($sth, $statement, @attribs) or return undef;
|
DBD::SQLite::st::_prepare($sth, $statement, @_) or return undef;
|
||||||
|
|
||||||
return $sth;
|
return $sth;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub _get_version {
|
sub _get_version {
|
||||||
return( DBD::SQLite::db::FETCH($_[0], 'sqlite_version') );
|
return ( DBD::SQLite::db::FETCH($_[0], 'sqlite_version') );
|
||||||
}
|
}
|
||||||
|
|
||||||
my %info = (
|
my %info = (
|
||||||
|
@ -110,11 +111,11 @@ sub get_info {
|
||||||
return $v;
|
return $v;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# SQL/CLI (ISO/IEC JTC 1/SC 32 N 0595), 6.63 Tables
|
||||||
|
# Based on DBD::Oracle's
|
||||||
|
# See also http://www.ch-werner.de/sqliteodbc/html/sqliteodbc_8c.html#a117
|
||||||
sub table_info {
|
sub table_info {
|
||||||
my ($dbh, $cat_val, $sch_val, $tbl_val, $typ_val) = @_;
|
my ($dbh, $cat_val, $sch_val, $tbl_val, $typ_val) = @_;
|
||||||
# SQL/CLI (ISO/IEC JTC 1/SC 32 N 0595), 6.63 Tables
|
|
||||||
# Based on DBD::Oracle's
|
|
||||||
# See also http://www.ch-werner.de/sqliteodbc/html/sqliteodbc_8c.html#a117
|
|
||||||
|
|
||||||
my @where = ();
|
my @where = ();
|
||||||
my $sql;
|
my $sql;
|
||||||
|
@ -252,50 +253,46 @@ sub primary_key_info {
|
||||||
}
|
}
|
||||||
|
|
||||||
sub type_info_all {
|
sub type_info_all {
|
||||||
my ($dbh) = @_;
|
|
||||||
return; # XXX code just copied from DBD::Oracle, not yet thought about
|
return; # XXX code just copied from DBD::Oracle, not yet thought about
|
||||||
my $names = {
|
# return [
|
||||||
TYPE_NAME => 0,
|
# {
|
||||||
DATA_TYPE => 1,
|
# TYPE_NAME => 0,
|
||||||
COLUMN_SIZE => 2,
|
# DATA_TYPE => 1,
|
||||||
LITERAL_PREFIX => 3,
|
# COLUMN_SIZE => 2,
|
||||||
LITERAL_SUFFIX => 4,
|
# LITERAL_PREFIX => 3,
|
||||||
CREATE_PARAMS => 5,
|
# LITERAL_SUFFIX => 4,
|
||||||
NULLABLE => 6,
|
# CREATE_PARAMS => 5,
|
||||||
CASE_SENSITIVE => 7,
|
# NULLABLE => 6,
|
||||||
SEARCHABLE => 8,
|
# CASE_SENSITIVE => 7,
|
||||||
UNSIGNED_ATTRIBUTE => 9,
|
# SEARCHABLE => 8,
|
||||||
FIXED_PREC_SCALE => 10,
|
# UNSIGNED_ATTRIBUTE => 9,
|
||||||
AUTO_UNIQUE_VALUE => 11,
|
# FIXED_PREC_SCALE => 10,
|
||||||
LOCAL_TYPE_NAME => 12,
|
# AUTO_UNIQUE_VALUE => 11,
|
||||||
MINIMUM_SCALE => 13,
|
# LOCAL_TYPE_NAME => 12,
|
||||||
MAXIMUM_SCALE => 14,
|
# MINIMUM_SCALE => 13,
|
||||||
SQL_DATA_TYPE => 15,
|
# MAXIMUM_SCALE => 14,
|
||||||
SQL_DATETIME_SUB => 16,
|
# SQL_DATA_TYPE => 15,
|
||||||
NUM_PREC_RADIX => 17,
|
# SQL_DATETIME_SUB => 16,
|
||||||
};
|
# NUM_PREC_RADIX => 17,
|
||||||
my $ti = [
|
# },
|
||||||
$names,
|
# [ 'CHAR', 1, 255, '\'', '\'', 'max length', 1, 1, 3,
|
||||||
[ 'CHAR', 1, 255, '\'', '\'', 'max length', 1, 1, 3,
|
# undef, '0', '0', undef, undef, undef, 1, undef, undef
|
||||||
undef, '0', '0', undef, undef, undef, 1, undef, undef
|
# ],
|
||||||
],
|
# [ 'NUMBER', 3, 38, undef, undef, 'precision,scale', 1, '0', 3,
|
||||||
[ 'NUMBER', 3, 38, undef, undef, 'precision,scale', 1, '0', 3,
|
# '0', '0', '0', undef, '0', 38, 3, undef, 10
|
||||||
'0', '0', '0', undef, '0', 38, 3, undef, 10
|
# ],
|
||||||
],
|
# [ 'DOUBLE', 8, 15, undef, undef, undef, 1, '0', 3,
|
||||||
[ 'DOUBLE', 8, 15, undef, undef, undef, 1, '0', 3,
|
# '0', '0', '0', undef, undef, undef, 8, undef, 10
|
||||||
'0', '0', '0', undef, undef, undef, 8, undef, 10
|
# ],
|
||||||
],
|
# [ 'DATE', 9, 19, '\'', '\'', undef, 1, '0', 3,
|
||||||
[ 'DATE', 9, 19, '\'', '\'', undef, 1, '0', 3,
|
# undef, '0', '0', undef, '0', '0', 11, undef, undef
|
||||||
undef, '0', '0', undef, '0', '0', 11, undef, undef
|
# ],
|
||||||
],
|
# [ 'VARCHAR', 12, 1024*1024, '\'', '\'', 'max length', 1, 1, 3,
|
||||||
[ 'VARCHAR', 12, 1024*1024, '\'', '\'', 'max length', 1, 1, 3,
|
# undef, '0', '0', undef, undef, undef, 12, undef, undef
|
||||||
undef, '0', '0', undef, undef, undef, 12, undef, undef
|
# ]
|
||||||
]
|
# ];
|
||||||
];
|
|
||||||
return $ti;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# Taken from Fey::Loader::SQLite
|
# Taken from Fey::Loader::SQLite
|
||||||
sub column_info {
|
sub column_info {
|
||||||
my($dbh, $catalog, $schema, $table, $column) = @_;
|
my($dbh, $catalog, $schema, $table, $column) = @_;
|
||||||
|
|
|
@ -9,7 +9,7 @@ use Test::More ();
|
||||||
|
|
||||||
use vars qw{$VERSION @ISA @EXPORT};
|
use vars qw{$VERSION @ISA @EXPORT};
|
||||||
BEGIN {
|
BEGIN {
|
||||||
$VERSION = '1.22_05';
|
$VERSION = '1.22_06';
|
||||||
@ISA = qw{ Exporter };
|
@ISA = qw{ Exporter };
|
||||||
@EXPORT = qw{ connect_ok };
|
@EXPORT = qw{ connect_ok };
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue