Re: [Dbix-class] Making DBD::Pg to return Postgres arrays as Perl arrays

2015-05-07 Thread Adam Sjøgren
ications. I haven't looked into DBD::Pg, I was just curious if I was overlooking existing functionality. Thanks! Adam -- "it will turn into pointer equality or something Adam Sjøgren ghastly like that" a...

Re: [Dbix-class] Making DBD::Pg to return Postgres arrays as Perl arrays

2015-05-07 Thread Adam Sjøgren
omething obvious, before hacking together a parser for Postgres' format. Best regards, Adam Adding Cc to the DBD::Pg mailing list, as it now looks to me to perhaps not just be me not configuring DBIx::Class properly. -- Adam Sjøg

Re: [Dbix-class] Making DBD::Pg to return Postgres arrays as Perl arrays

2015-05-07 Thread Adam Sjøgren
old a DBD::Pg version (2.19.0-1), what version are you using? Best regards, Adam -- Adam Sjøgren a...@novozymes.com ___ List: h

Re: [Dbix-class] Making DBD::Pg to return Postgres arrays as Perl arrays

2015-05-07 Thread Adam Sjøgren
Will writes: > { data_type => "integer[]", ... } > works for me? Ahh, cool, I will try that. My arrays are sometimes of custom types, but I will experiment. Thanks for the tip! Best regards, Adam --

[Dbix-class] Making DBD::Pg to return Postgres arrays as Perl arrays

2015-05-07 Thread Adam Sjøgren
ing-with-PostgreSQL-array-types but not how to read them.) Any pointers? Thanks, Adam -- Adam Sjøgren a...@novozymes.com ___ List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/d

Re: [Dbix-class] Dynamic/Flexible DBIC views

2014-12-01 Thread Adam Sjøgren
) Try something like: my $foos=$schema->resultset('Foo'); while (my $row=$foos->next) { ... } Best regards, Adam -- "In the past we would do little things for love, but Adam Sjøgren but things, big things required money.

Re: [Dbix-class] Strange statistically significant failure for DBIC with Sybase

2014-02-04 Thread Adam Sjøgren
.pm > line 1908 > The interesting information is inside that ARRAY ref, unfortunately. How about adding a line to ASE.pm or DBI.pm that outputs the information you are after? Just a crazy idea, Adam -- "You know, if the sun was an oboe, what would y

[Dbix-class] Re: Use of resultset->search within a sub

2013-07-30 Thread Adam Sjøgren
This? Best regards, Adam -- "Angels can fly because they take themselves lightly." Adam Sjøgren a...@koldfront.dk ___ List: http://lists.scsys.co.uk/cg

[Dbix-class] Re: How to elegantly memoize method calls to related tables

2012-05-02 Thread Adam Sjøgren
the event table and person objects are then generated for you from that single query. Running your script with DBIC_TRACE=1 set in the environment is an easy way to check that prefetching indeed saves you roundtrips to the database. Best regards, Adam -- "You have to photosynthe

[Dbix-class] Re: using as normal perl module

2011-07-29 Thread Adam Sjøgren
', > USER', 'PASSWD', { AutoCommit=>1, pg_enable_utf8=>1 }); -- "Good car to drive after a war" Adam Sjøgren a...@koldfront.dk __

[Dbix-class] Re: using as normal perl module

2011-07-29 Thread Adam Sjøgren
you asked for something that doesn't use Catalyst and is small (I left out the helper-sub and the error-checking) :-) Maybe if you show what you have tried and describe what you wanted, it is easier to get help. Best regards, Adam -- "Good car to drive after a war"

[Dbix-class] Re: any factual comparisons of Oracle, PostgreSQL, MySQL ?

2011-04-13 Thread Adam Sjøgren
bms/ Best regards, Adam -- "I got into the driver’s seat Adam Sjøgren And I drove down 42nd Street a...@koldfront.dk In my Cadillac Good car to drive after a war" ___ Lis

[Dbix-class] Re: Iteration with ->next versus using ->all, and count

2010-09-01 Thread Adam Sjøgren
merge - thanks! Best regards, Adam -- Adam Sjøgren a...@novozymes.com ___ List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-cl

[Dbix-class] Re: Iteration with ->next versus using ->all, and count

2010-09-01 Thread Adam Sjøgren
them. Thanks! Best regards, Adam -- Adam Sjøgren a...@novozymes.com ___ List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.

[Dbix-class] Iteration with ->next versus using ->all, and count

2010-09-01 Thread Adam Sjøgren
drivers.car_id FROM car me LEFT JOIN driver drivers ON drivers.car_id = me.id WHERE ( me.fleet_id = ? ): '1' Christensen Use of uninitialized value in concatenation (.) or string at ./test.pl line 24. Elgaard Magnussen Issuing rollback() for database handle be

[Dbix-class] Re: BUG? Unable to resolve relationship

2009-12-15 Thread Adam Sjøgren
om C in that a C relationship +returns undef or exactly one row, while has_many returns a resultset +(which can match no, one, or more rows.) + =over =item accessor_name -- 1.6.3.3 -- Adam Sjøgren

[Dbix-class] Re: BUG? Unable to resolve relationship

2009-12-14 Thread Adam Sjøgren
at! Best regards, Adam -- Adam Sjøgren a...@novozymes.com ___ List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst

[Dbix-class] Re: BUG? Unable to resolve relationship

2009-12-14 Thread Adam Sjøgren
ts is discarded with a loud warning. Thanks for this very clear explanation. It should be shoveled into the documentation right away! Best regards, Adam -- Adam Sjøgren

[Dbix-class] Re: "Dry-run" for SQL ?

2009-07-02 Thread Adam Sjøgren
; }; $schema->txn_do($transaction); Remembering to put the die in there is of course important :-) Best regards, Adam -- Adam Sjøgren a...@novozymes.com __

[Dbix-class] might_have cascade_* documentation clarification [patch]

2008-09-30 Thread Adam Sjøgren
>> and/or +C<< cascade_delete => 0 >> to the C<$attr> hashref. The cascaded operations are performed after the requested delete or update, so if your database has a constraint on the relationship, it -- "I wan

[Dbix-class] Re: create without setting a nullable foreign key, then accessing relationship

2008-06-11 Thread Adam Sjøgren
On Wed, 11 Jun 2008 12:53:34 +0100, Ash wrote: > On 11 Jun 2008, at 12:35, Adam Sjøgren wrote: >> and mike provided a test-patch in: >> <http://article.gmane.org/gmane.comp.lang.perl.modules.dbix-class/5443> . >> The test-patch broke some other patches, so I post

[Dbix-class] create without setting a nullable foreign key, then accessing relationship

2008-06-11 Thread Adam Sjøgren
;fleet_id'); 1; CarDB/Fleet.pm: --- package CarDB::Fleet; use strict; use warnings; use base qw(DBIx::Class); __PACKAGE__->load_components('PK::Auto', 'Core'); __PACKAGE__->table('fleet'); __PACKAGE__->add_columns(qw(id company)); __PACKAGE__->set_primary_key('id')

[Dbix-class] Re: Unexpected behavior with possible NULL foreign key relationship

2008-06-04 Thread Adam Sjøgren
k secs ( 0.74 usr 0.25 sys + 75.95 cusr 5.10 csys = 82.04 CPU) Result: FAIL The patch is against the latest 0.08/trunk (I hope that is the right thing to do). Best regards, Adam --

[Dbix-class] Re: ROLLBACK seems to be skipped on 0.08

2007-11-03 Thread Adam Sjøgren
e usual > mix that overrides disallowed methods like search_literal, etc. That sounds cool - I guess it also is way more configurable than what people are used to today (the few using AutoCommit=0 getting "you forgot to think about transactions"-feedback early, and the majority

[Dbix-class] Re: ROLLBACK seems to be skipped on 0.08

2007-11-02 Thread Adam Sjøgren
DBI directly instead of going through DBIx::Class, but I shouldn't and most probably won't). Best regards, Adam -- "Although, in a sense, recognizing them as ancient Adam Sjøgren might not necessarily be wrong, it's indeed useless." [EMAIL PROTECTED] __

[Dbix-class] Re: ROLLBACK seems to be skipped on 0.08

2007-11-02 Thread Adam Sjøgren
nice way to ensure that I remember to consider transactions for all the parts of the code that modifies/adds stuff. Since txn_do arrived, I know I ought to use that for transactions, every time I need them, but with AutoCommit=1 I lose the automatic kick in the head if (when)

[Dbix-class] Re: quote_char, order_by and DESC

2007-10-19 Thread Adam Sjøgren
On Thu, 18 Oct 2007 18:55:43 +0100, Matt wrote: > On Thu, Oct 18, 2007 at 04:39:54PM +0200, Adam Sjøgren wrote: >> $schema->storage->sql_maker->quote_char('"'); >> $schema->storage->sql_maker->name_sep('.'); >> This works fine un

[Dbix-class] quote_char, order_by and DESC

2007-10-18 Thread Adam Sjøgren
TABLE INSERT 0 1 $ psql userdb --command 'SELECT * FROM "user" ORDER BY "name" DESC' id | name +-- 1 | Axel (1 row) $ ./test.pl DBIx::Class::ResultSet::search(): DBI Exception: DBD::Pg::st execute failed: ERROR: column "name DESC" does