From: Peter Rabbitson Date: Sat, 8 Aug 2009 23:19:49 +0000 (+0000) Subject: Changes and minor code rewrap X-Git-Tag: v0.08112~14^2~69 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=64786748d00f326a7f0a07028e187c2418d18e0d;p=dbsrgits%2FDBIx-Class.git Changes and minor code rewrap --- diff --git a/Changes b/Changes index a7518cb..0af2dc5 100644 --- a/Changes +++ b/Changes @@ -18,20 +18,17 @@ Revision history for DBIx::Class - 'uniqueidentifier' support with auto newid() - Dynamic cursor support and other MARS options for ODBC - savepoints with auto_savepoint => 1 - - Support for MSSQL 'money' type + - Complete Sybase RDBMS support including: + - Support for TEXT/IMAGE columns + - Transaction savepoints support + - Support for bind variables when connecting via Sybase OpenClient + - Support for interpolated variables with proper quoting when + connecting via FreeTDS + - Support for MSSQL/Sybase 'money' type - Support for 'smalldatetime' type used in MSSQL and Sybase for InflateColumn::DateTime - Support for Postgres 'timestamp without timezone' type in InflateColumn::DateTime - - Much improved Sybase support, including support for TEXT/IMAGE - columns and connecting via FreeTDS - - Replication updates: Improved the replication tests so that they are - more reliable and accurate, and hopefully solve some cross platform - issues. Bugfixes related to naming particular replicants in a - 'force_pool' attribute. Lots of documentation updates, including a - new Introduction.pod file. Fixed the way we detect transaction to - make this more reliable and forward looking. Fixed some trouble with - the way Moose Types are used. - Added new MySQL specific on_connect_call macro 'set_strict_mode' (also known as make_mysql_not_suck_as_much) - Multiple prefetch-related fixes: diff --git a/lib/DBIx/Class/ResultSet.pm b/lib/DBIx/Class/ResultSet.pm index e42e799..f86a6ca 100644 --- a/lib/DBIx/Class/ResultSet.pm +++ b/lib/DBIx/Class/ResultSet.pm @@ -2764,31 +2764,38 @@ sub _resolved_attrs { # build columns (as long as select isn't set) into a set of as/select hashes unless ( $attrs->{select} ) { - @colbits = map { - ( ref($_) eq 'HASH' ) - ? $_ - : { - ( - /^\Q${alias}.\E(.+)$/ - ? "$1" - : "$_" - ) - => - ( - /\./ - ? "$_" - : "${alias}.$_" - ) - } - } ( ref($attrs->{columns}) eq 'ARRAY' ) ? - @{ delete $attrs->{columns}} : - (delete $attrs->{columns} || - $source->storage->order_columns_for_select( - $source, - [ $source->columns ] - ) - ); + + my @cols = ( ref($attrs->{columns}) eq 'ARRAY' ) + ? @{ delete $attrs->{columns}} + : ( + ( delete $attrs->{columns} ) + || + $source->storage->order_columns_for_select( + $source, + [ $source->columns ] + ) + ) + ; + + @colbits = map { + ( ref($_) eq 'HASH' ) + ? $_ + : { + ( + /^\Q${alias}.\E(.+)$/ + ? "$1" + : "$_" + ) + => + ( + /\./ + ? "$_" + : "${alias}.$_" + ) + } + } @cols; } + # add the additional columns on foreach ( 'include_columns', '+columns' ) { push @colbits, map {