[Dbix-class] Schema export

2006-03-01 Thread Bernhard Graf
--from DBIx::Class --to MySQL MySchema.pm Schema1.sql spits out: Error: translate: Error with parser 'DBIx::Class': Undefined subroutine DBIx::Class::parse called at /usr/lib/perl5/vendor_perl/5.8.5/SQL/Translator.pm line 484. What is the correct way? -- Bernhard Graf

[Dbix-class] DBIx::Class::HTMLWidget enhancement

2006-03-11 Thread Bernhard Graf
I'd like to have DBIx::Class::HTMLWidget set my widget element's maxlength if available from DBIC result_source and appropriate for the widget element. I attach my changes here. This is not very much tested, but works for me. What do you think? -- Bernhard Graf --- /usr/lib/perl5/vendor_perl

[Dbix-class] Bug: update_or_create() and auto-inflate/deflate

2006-05-10 Thread Bernhard Graf
in deflated state, right? -- Bernhard Graf ___ List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class Wiki: http://dbix-class.shadowcatsystems.co.uk/ IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/

Re: [Dbix-class] Bug: update_or_create() and auto-inflate/deflate

2006-05-21 Thread Bernhard Graf
. -- Bernhard Graf ___ List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class Wiki: http://dbix-class.shadowcatsystems.co.uk/ IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/

Re: [Dbix-class] call for testing: 07001

2006-08-13 Thread Bernhard Graf
. INST_FILE/usr/lib/perl5/vendor_perl/5.8.5/DBIx/Class.pm INST_VERSION 0.06003 cpan install DBIx::Class DBIx::Class is up to date. -- Bernhard Graf ___ List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class Wiki: http://dbix

Re: [Dbix-class] escape char support

2006-09-24 Thread Bernhard Graf
Daniel Westermann-Clark wrote: On 2006-09-23 22:18:35 +0200, Bernhard Graf wrote: my $esc = $c-model('DB::Table')-result_source-schema-storage-dbh-get_in fo(14); my $input = $c-request-params-{input} $input =~ s/([_%])/$esc$1/g; Not very pretty, but always needed, where user input from

[Dbix-class] Caching of related resultsets

2006-10-06 Thread Bernhard Graf
) = @_; $self-roles-find($role); } To save db access I'd prefer caching $user-roles-all inside the user object ($c-user-obj) in the first call of has_role() and access roles in subsequent calls to has_role() from this cache. Is this possible? -- Bernhard Graf

Re: [Dbix-class] Caching of related resultsets

2006-10-06 Thread Bernhard Graf
On Friday 06 October 2006 18:42, Bernhard Graf wrote: I have a user - roles setup similar to Catalyst::Manual::Tutorial::Authentication. My application quite often queries roles for the authenticated user ($c-user-obj) within one HTTP query. For this purpose I defined a method in the DBIC

Re: [Dbix-class] Feature request for DBIx::Class::InflateColumn::inflate_co lumn

2006-10-28 Thread Bernhard Graf
-inflate }, deflate = sub { shift-deflate }, }) for qw/col1 col2 col3/; ? Buys us readability and saves us a little typing and few CPU-Cycles ;-) I would think. At least it doesn't hurt. ;-) -- Bernhard Graf ___ List: http://lists.rawmode.org

Re: [Dbix-class] JOIN question

2006-11-27 Thread Bernhard Graf
not quite sure which code you mean (my Perl code, my SQL code or DBIC). I hacked on the latter and now my task can be solved (though it is still very ugly). Matt, make me happy and apply the attached patch to DBIC. :-) -- Bernhard Graf --- DBIx/Class/Storage/DBI.pm (revision 2947) +++ DBIx/Class

[Dbix-class] Patch: inflate_column

2006-11-27 Thread Bernhard Graf
Since I have a current DBIC working copy on my HD now, I also offer this patch to be applied. It lets you set an inflator for multiple columns at once, as described in my email one month ago: http://lists.scsys.co.uk/pipermail/dbix-class/2006-October/002687.html -- Bernhard Graf --- DBIx/Class

Re: [Dbix-class] Patch: inflate_column

2006-11-28 Thread Bernhard Graf
Matt S Trout wrote: Bernhard Graf wrote: Since I have a current DBIC working copy on my HD now, I also offer this patch to be applied. It lets you set an inflator for multiple columns at once, as described in my email one month ago: http://lists.scsys.co.uk/pipermail/dbix-class/2006

Re: [Dbix-class] JOIN question

2006-11-28 Thread Bernhard Graf
. ;-) -- Bernhard Graf ___ List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class Wiki: http://dbix-class.shadowcatsystems.co.uk/ IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/ Searchable Archive: http

Re: [Dbix-class] JOIN question

2006-11-28 Thread Bernhard Graf
something like { 'table1.key' = \'!=table2.key', 'table1.maximum = {'', 23}} that should result in table1.key != table2.key AND table1.maximum 23 -- Bernhard Graf ___ List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class Wiki: http

Re: [Dbix-class] JOIN question

2006-11-28 Thread Bernhard Graf
Matt S Trout wrote: Bernhard Graf wrote: Matt S Trout wrote: SELECT me.title FROM email me LEFT JOIN chunk chunks ON chunks.email=me.id LEFT JOIN chunk chunks_2 ON chunks_2.email=me.id AND chunks.id!=chunks_2.id why not just join = [ qw/chunks chunks/ ] and add { 'chunks.id

Re: [Dbix-class] JOIN question

2006-11-28 Thread Bernhard Graf
isn't either a scalar or a scalar reference. -- Bernhard Graf ___ List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class Wiki: http://dbix-class.shadowcatsystems.co.uk/ IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast

Re: [Dbix-class] Re: JOIN question

2006-11-29 Thread Bernhard Graf
A. Pagaltzis wrote: * Bernhard Graf [EMAIL PROTECTED] [2006-11-28 23:35]: turned out that this cannot be easily achived, because of shortcomings in SQL::Abstract, which doesn't support placeholders in the FROM-part of a query. Neither does any database, so I don’t see it as a shortcoming

Re: [Dbix-class] JOIN question

2006-11-29 Thread Bernhard Graf
Matt S Trout wrote: Where are the tests? Here you are! -- Bernhard Graf Index: t/76joins.t === --- t/76joins.t (revision 2953) +++ t/76joins.t (working copy) @@ -16,7 +16,7 @@ eval use DBD::SQLite; plan

Re: [Dbix-class] JOIN question

2006-11-30 Thread Bernhard Graf
). Exactly. chunks.id!=chunks_2.id servers completely different purposes if it is either in a LEFT JOIN or else in the WHERE part. -- Bernhard Graf ___ List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class Wiki: http://dbix

Re: [Dbix-class] JOIN question

2006-11-30 Thread Bernhard Graf
must be different to my suggestions without justification - if you don't explain *why* you think that, I can't tell you the bit you're missing :) I'm still not convinced. ;-P Anyway - is the patch I sent yesterday acceptable now? -- Bernhard Graf

Re: [Dbix-class] JOIN question

2006-11-30 Thread Bernhard Graf
now? -- Bernhard Graf ___ List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class Wiki: http://dbix-class.shadowcatsystems.co.uk/ IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/ Searchable Archive

[Dbix-class] JOIN patch and inflate_columns patch

2006-12-06 Thread Bernhard Graf
- what is the status of these patches? -- Bernhard Graf ___ List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class Wiki: http://dbix-class.shadowcatsystems.co.uk/ IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/trunk

Re: [Dbix-class] JOIN patch and inflate_columns patch

2006-12-06 Thread Bernhard Graf
understand. Matt, thanks for answering my request. -- Bernhard Graf ___ List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class Wiki: http://dbix-class.shadowcatsystems.co.uk/ IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos

Re: [Dbix-class] JOIN patch and inflate_columns patch

2006-12-06 Thread Bernhard Graf
implementing it that caused you to do it differently? I cannot find your posting where you proposed that originally. Anyway my implementation potentially saves method calls while your proposal adds one or more. -- Bernhard Graf ___ List: http

Re: [Dbix-class] inflators / defaltors

2007-03-26 Thread Bernhard Graf
NetAddr::IP) is the right approach for DBIC inflators. HTH -- Bernhard Graf ___ List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class Wiki: http://dbix-class.shadowcatsystems.co.uk/ IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org

[Dbix-class] Return value of DBIx::Class::ResultSet::find()

2007-05-13 Thread Bernhard Graf
, to be consistent it should always return a single value: either a row object or undef. Objections? -- Bernhard Graf ___ List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class Wiki: http://dbix-class.shadowcatsystems.co.uk/ IRC: irc.perl.org#dbix

Re: [Dbix-class] Return value of DBIx::Class::ResultSet::find()

2007-05-14 Thread Bernhard Graf
? Opinions welcome, I'm not -overly- troubled either way although by default I'd say the current conceptual consistency is the correct answer. At least documentation should clarify the fact, that find() returns a list of row objects, that either has 1 or 0 elements. -- Bernhard Graf

Re: [Dbix-class] Return value of DBIx::Class::ResultSet::find()

2007-05-15 Thread Bernhard Graf
Matt S Trout wrote: On Sun, May 13, 2007 at 10:25:16PM +0200, Bernhard Graf wrote: So since find() is not designed to return lists, to be consistent it should always return a single value: either a row object or undef. Objections? I'm now convinced. Patch and test please, if you

Re: [Dbix-class] Return value of DBIx::Class::ResultSet::find()

2007-05-19 Thread Bernhard Graf
are. The actual patch is really simple. Concerning the tests: I hope I got your instructions right... hope it's OK the way it is. -- Bernhard Graf Index: t/61findnot.t === --- t/61findnot.t (revision 0) +++ t/61findnot.t (revision 0) @@ -0,0

Re: [Dbix-class] DBIx-Class 0.08 released

2007-06-19 Thread Bernhard Graf
Matt S Trout wrote: Have fun! I think this is a good moment to say Thank you for the tremendous work to Matt and all contributors. DBIx::Class is great. -- Bernhard Graf ___ List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class Wiki