r39662 - in /trunk/librose-db-perl: Changes META.yml debian/changelog debian/control lib/Rose/DB.pm lib/Rose/DB/Pg.pm lib/Rose/DB/Registry/Entry.pm t/pg.t t/subclass-pg.t
nhandler-guest at users.alioth.debian.org
nhandler-guest at users.alioth.debian.org
Fri Jul 10 14:05:44 UTC 2009
Author: nhandler-guest
Date: Fri Jul 10 14:05:37 2009
New Revision: 39662
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=39662
Log:
* New upstream release
* debian/control:
- Add myself to list of Uploaders
Modified:
trunk/librose-db-perl/Changes
trunk/librose-db-perl/META.yml
trunk/librose-db-perl/debian/changelog
trunk/librose-db-perl/debian/control
trunk/librose-db-perl/lib/Rose/DB.pm
trunk/librose-db-perl/lib/Rose/DB/Pg.pm
trunk/librose-db-perl/lib/Rose/DB/Registry/Entry.pm
trunk/librose-db-perl/t/pg.t
trunk/librose-db-perl/t/subclass-pg.t
Modified: trunk/librose-db-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/librose-db-perl/Changes?rev=39662&op=diff
==============================================================================
--- trunk/librose-db-perl/Changes (original)
+++ trunk/librose-db-perl/Changes Fri Jul 10 14:05:37 2009
@@ -1,7 +1,13 @@
+0.753 (07.09.2009) - John Siracusa <siracusa at gmail.com>
+
+ * Detect enum-like columns in PostgreSQL. (RT 46214)
+ * Added support for the "sslmode" DSN option for PostgreSQL.
+ (Reported by foudfou)
+
0.752 (05.08.2009) - John Siracusa <siracusa at gmail.com>
* Added workaround for the lack of getpwuid() on Windows.
- * SQLite column and table names are not properly unquoted when
+ * SQLite column and table names are now properly unquoted when
necessary. (RT 45836)
* Indicate that MySQL 5.0.45 and later supports selecting from
a subselect.
@@ -116,13 +122,13 @@
object was given a $dbh that was generated elsewhere.
* Improved detection of SKIP ... FIRST ... support in Informix.
* Fixed a bug that prevented certain reserved words from being detected
- as primary key columns in Postgres. (Reported by Fred Cox)
+ as primary key columns in PostgreSQL. (Reported by Fred Cox)
0.733 (02.23.2007) - John Siracusa <siracusa at gmail.com>
* Schema support enabled for MySQL.
* Added support for Informix's "datetime year to month" column type.
- * Tweaked handling of doubled quotes in Postgres default column values.
+ * Tweaked handling of doubled quotes in PostgreSQL default column values.
0.732 (01.15.2007) - John Siracusa <siracusa at gmail.com>
@@ -183,7 +189,7 @@
* Corrected the number of tests in oracle.t and subclass-oracle.t.
(Reported by Michael Lackhoff)
* Failure to load a driver class is now a fatal error.
- * Fixed parsing of empty string default values in Postgres.
+ * Fixed parsing of empty string default values in PostgreSQL.
0.723 (08.10.2006) - John Siracusa <siracusa at gmail.com>
@@ -197,7 +203,7 @@
0.721 (07.14.2006) - John Siracusa <siracusa at gmail.com>
* Added end-of-month mode parameter to parse_interval()
- * Added to the list of reserved words for Postgres and MySQL.
+ * Added to the list of reserved words for PostgreSQL and MySQL.
0.72 (06.30.2006) - John Siracusa <siracusa at gmail.com>
@@ -214,7 +220,7 @@
* Added Storable hooks.
* Driver classes no longer inherit from Rose::DB.
* Improved Oracle DSN generation and quoting. (Suggested by Todd Lorenz)
- * Improved parsing of default column values in Postgres databases.
+ * Improved parsing of default column values in PostgreSQL databases.
0.673 (05.12.2006) - John Siracusa <siracusa at gmail.com>
@@ -224,7 +230,7 @@
0.672 (04.14.2006) - John Siracusa <siracusa at gmail.com>
- * Translate Postgres's "real" type to the standard "float" type.
+ * Translate PostgreSQL's "real" type to the standard "float" type.
(Patch from Lucian Dragus)
0.671 (04.04.2006) - John Siracusa <siracusa at gmail.com>
@@ -283,7 +289,7 @@
0.58 (01.05.2006) - John Siracusa <siracusa at gmail.com>
- * Improved parsing of default column values in Postgres.
+ * Improved parsing of default column values in PostgreSQL.
0.57 (12.31.2005) - John Siracusa <siracusa at gmail.com>
@@ -291,7 +297,7 @@
0.56 (12.19.2005) - John Siracusa <siracusa at gmail.com>
- * Added support for prepended Postgres arrays (e.g., "[0:3]={3,4,5,6}")
+ * Added support for prepended PostgreSQL arrays (e.g., "[0:3]={3,4,5,6}")
0.55 (12.15.2005) - John Siracusa <siracusa at gmail.com>
@@ -326,7 +332,7 @@
* Driver names are now case-insensitive.
* Added generic fallback class for unsupported databases.
* Added the use_private_registry() convenience method.
- * Added some tweaks to support Postgres 8.1.
+ * Added some tweaks to support PostgreSQL 8.1.
0.031 (10.25.2005) - John Siracusa <siracusa at gmail.com>
@@ -364,7 +370,7 @@
0.024 (08.12.2005) - John Siracusa <siracusa at gmail.com>
- * Case-sensitivity fixes for Postgres.
+ * Case-sensitivity fixes for PostgreSQL.
* Added tentative support for Informix 10's "limit with offset" feature.
0.023 (08.09.2005) - John Siracusa <siracusa at gmail.com>
@@ -373,7 +379,7 @@
0.022 (08.09.2005) - John Siracusa <siracusa at gmail.com>
- * Fixed Postgres column default value parsing.
+ * Fixed PostgreSQL column default value parsing.
0.021 (08.05.2005) - John Siracusa <siracusa at gmail.com>
Modified: trunk/librose-db-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/librose-db-perl/META.yml?rev=39662&op=diff
==============================================================================
--- trunk/librose-db-perl/META.yml (original)
+++ trunk/librose-db-perl/META.yml Fri Jul 10 14:05:37 2009
@@ -1,6 +1,6 @@
--- #YAML:1.0
name: Rose-DB
-version: 0.752
+version: 0.753
abstract: ~
author: []
license: perl
@@ -33,7 +33,7 @@
directory:
- t
- inc
-generated_by: ExtUtils::MakeMaker version 6.50
+generated_by: ExtUtils::MakeMaker version 6.52
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: 1.4
Modified: trunk/librose-db-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/librose-db-perl/debian/changelog?rev=39662&op=diff
==============================================================================
--- trunk/librose-db-perl/debian/changelog (original)
+++ trunk/librose-db-perl/debian/changelog Fri Jul 10 14:05:37 2009
@@ -1,3 +1,11 @@
+librose-db-perl (0.753-1) unstable; urgency=low
+
+ * New upstream release
+ * debian/control:
+ - Add myself to list of Uploaders
+
+ -- Nathan Handler <nhandler at ubuntu.com> Fri, 10 Jul 2009 14:05:11 +0000
+
librose-db-perl (0.752-2) unstable; urgency=low
[ Nathan Handler ]
Modified: trunk/librose-db-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/librose-db-perl/debian/control?rev=39662&op=diff
==============================================================================
--- trunk/librose-db-perl/debian/control (original)
+++ trunk/librose-db-perl/debian/control Fri Jul 10 14:05:37 2009
@@ -9,7 +9,8 @@
libdbd-sqlite3-perl, librose-object-perl (>= 0.854)
Uploaders: Krzysztof Krzyżaniak (eloy) <eloy at debian.org>,
Rene Mayorga <rmayorga at debian.org>, Brian Cassidy <brian.cassidy at gmail.com>,
- gregor herrmann <gregoa at debian.org>, Ryan Niebur <ryanryan52 at gmail.com>
+ gregor herrmann <gregoa at debian.org>, Ryan Niebur <ryanryan52 at gmail.com>,
+ Nathan Handler <nhandler at ubuntu.com>
Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
Homepage: http://search.cpan.org/dist/Rose::DB/
Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/librose-db-perl/
Modified: trunk/librose-db-perl/lib/Rose/DB.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/librose-db-perl/lib/Rose/DB.pm?rev=39662&op=diff
==============================================================================
--- trunk/librose-db-perl/lib/Rose/DB.pm (original)
+++ trunk/librose-db-perl/lib/Rose/DB.pm Fri Jul 10 14:05:37 2009
@@ -20,7 +20,7 @@
our $Error;
-our $VERSION = '0.752';
+our $VERSION = '0.753';
our $Debug = 0;
Modified: trunk/librose-db-perl/lib/Rose/DB/Pg.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/librose-db-perl/lib/Rose/DB/Pg.pm?rev=39662&op=diff
==============================================================================
--- trunk/librose-db-perl/lib/Rose/DB/Pg.pm (original)
+++ trunk/librose-db-perl/lib/Rose/DB/Pg.pm Fri Jul 10 14:05:37 2009
@@ -8,9 +8,21 @@
use Rose::DB;
-our $VERSION = '0.738';
+our $VERSION = '0.753';
our $Debug = 0;
+
+#
+# Object data
+#
+
+use Rose::Object::MakeMethods::Generic
+(
+ 'scalar' =>
+ [
+ qw(sslmode service options)
+ ],
+);
#
# Object methods
@@ -23,13 +35,14 @@
my %info;
$info{'dbname'} = $args{'db'} || $args{'database'};
- $info{'host'} = $args{'host'};
- $info{'port'} = $args{'port'};
+
+ @info{qw(host port options service sslmode)} =
+ @args{qw(host port options service sslmode)};
return
"dbi:Pg:" .
join(';', map { "$_=$info{$_}" } grep { defined $info{$_} }
- qw(dbname host port));
+ qw(dbname host port options service sslmode));
}
sub dbi_driver { 'Pg' }
@@ -369,7 +382,6 @@
$col_info->{'COLUMN_SIZE'} = undef;
}
-
# Pg does not populate COLUMN_SIZE correctly for bit fields, so
# we have to extract the number of bits from pg_type.
if($col_info->{'pg_type'} =~ /^bit\((\d+)\)$/)
@@ -390,6 +402,14 @@
$col_info->{'COLUMN_SIZE'} = $2;
$col_info->{'DECIMAL_DIGITS'} = $1;
}
+ }
+
+ # Treat custom types that look like enums as enums
+ if(ref $col_info->{'pg_enum_values'} && @{$col_info->{'pg_enum_values'}})
+ {
+ $col_info->{'TYPE_NAME'} = 'enum';
+ $col_info->{'RDBO_ENUM_VALUES'} = $col_info->{'pg_enum_values'};
+ $col_info->{'RDBO_DB_TYPE'} = $col_info->{'pg_type'};
}
# We currently treat all arrays the same, regardless of what they are
@@ -583,6 +603,10 @@
See the L<DBD::Pg|DBD::Pg/pg_enable_utf8> documentation to learn more about this attribute.
+=item B<sslmode [MODE]>
+
+Get or set the SSL mode of the connection. Valid values for MODE are C<disable>, C<allow>, C<prefer>, and C<require>. This attribute is used to build the L<DBI> L<dsn|Rose::DB/dsn>. Setting it has no effect until the next L<connect|Rose::DB/connect>ion. See the L<DBD::Pg|DBD::Pg/connect> documentation to learn more about this attribute.
+
=back
=head2 Value Parsing and Formatting
Modified: trunk/librose-db-perl/lib/Rose/DB/Registry/Entry.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/librose-db-perl/lib/Rose/DB/Registry/Entry.pm?rev=39662&op=diff
==============================================================================
--- trunk/librose-db-perl/lib/Rose/DB/Registry/Entry.pm (original)
+++ trunk/librose-db-perl/lib/Rose/DB/Registry/Entry.pm Fri Jul 10 14:05:37 2009
@@ -7,7 +7,7 @@
use Rose::Object;
our @ISA = qw(Rose::Object);
-our $VERSION = '0.749';
+our $VERSION = '0.753';
our $Debug = 0;
@@ -16,7 +16,7 @@
#
our %Attrs;
-
+
BEGIN
{
our %Attrs =
@@ -45,7 +45,10 @@
# Pg
european_dates => { type => 'boolean', method_spec => { default => 0 } },
pg_enable_utf8 => { type => 'boolean' },
-
+ options => { type => 'scalar' },
+ service => { type => 'scalar' },
+ sslmode => { type => 'scalar' },
+
# SQLite
auto_create => { type => 'boolean', method_spec => { default => 1 } },
@@ -529,6 +532,10 @@
See the L<DBD::Pg|DBD::Pg/pg_enable_utf8> documentation to learn more about this attribute.
+=item B<sslmode [MODE]>
+
+Get or set the SSL mode of the connection. Valid values for MODE are C<disable>, C<allow>, C<prefer>, and C<require>. See the L<DBD::Pg|DBD::Pg/connect> documentation to learn more about this attribute.
+
=back
=head3 SQLite
Modified: trunk/librose-db-perl/t/pg.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/librose-db-perl/t/pg.t?rev=39662&op=diff
==============================================================================
--- trunk/librose-db-perl/t/pg.t (original)
+++ trunk/librose-db-perl/t/pg.t Fri Jul 10 14:05:37 2009
@@ -15,7 +15,7 @@
}
else
{
- Test::More->import(tests => 234);
+ Test::More->import(tests => 237);
}
}
@@ -60,6 +60,17 @@
$db->disconnect;
$db2->disconnect;
}
+
+$db = Rose::DB->new();
+
+$db->sslmode('allow');
+is($db->dsn, 'dbi:Pg:dbname=test;host=localhost;sslmode=allow', 'sslmode()');
+
+$db->options('opts');
+is($db->dsn, 'dbi:Pg:dbname=test;host=localhost;options=opts;sslmode=allow', 'options()');
+
+$db->service('srv');
+is($db->dsn, 'dbi:Pg:dbname=test;host=localhost;options=opts;service=srv;sslmode=allow', 'service()');
$db = Rose::DB->new();
Modified: trunk/librose-db-perl/t/subclass-pg.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/librose-db-perl/t/subclass-pg.t?rev=39662&op=diff
==============================================================================
--- trunk/librose-db-perl/t/subclass-pg.t (original)
+++ trunk/librose-db-perl/t/subclass-pg.t Fri Jul 10 14:05:37 2009
@@ -15,7 +15,7 @@
}
else
{
- Test::More->import(tests => 234);
+ Test::More->import(tests => 237);
}
}
@@ -60,6 +60,17 @@
$db->disconnect;
$db2->disconnect;
}
+
+$db = My::DB2->new();
+
+$db->sslmode('allow');
+is($db->dsn, 'dbi:Pg:dbname=test;host=localhost;sslmode=allow', 'sslmode()');
+
+$db->options('opts');
+is($db->dsn, 'dbi:Pg:dbname=test;host=localhost;options=opts;sslmode=allow', 'options()');
+
+$db->service('srv');
+is($db->dsn, 'dbi:Pg:dbname=test;host=localhost;options=opts;service=srv;sslmode=allow', 'service()');
$db = My::DB2->new();
More information about the Pkg-perl-cvs-commits
mailing list