Re: [Dbix-class] applying row level methods via Schema::Loader

2007-07-04 Thread apv
Terrific. Thanks you guys! I'll probably do the additional base class. I had no idea you could autogenerate into modified classes too which I'll have to try for another project. Best of both worlds. –Ashley -- On Jul 4, 2007, at 7:42 AM, Brandon Black wrote: On 7/3/07, a

[Dbix-class] applying row level methods via Schema::Loader

2007-07-03 Thread apv
I never got around to trying Schema::Loader till now. It's terrific. I swapped out 10 table classes or whatever with one and it works exactly as it should. The thing I want to still be able to do is apply a method to all the table classes, specifically a created field stamp of NOW(). I'm on

[Dbix-class] Disconnecting cleanly

2007-01-08 Thread apv
From the DBIx::Class::Manual::Cookbook -- Disconnecting cleanly If you find yourself quitting an app with Control-C a lot during development, you might like to put the following signal handler in your main database class to make sure it disconnects cleanly: $SIG{INT} = sub { __PACKAGE__

[Dbix-class] History/revision/diff strategy

2006-11-25 Thread apv
Given a table "article" which has_many "article_history" would this be a reasonable approach to keeping track of the history for diffs and stuff? Is there a better one? Just store the diff (and apply them recursively to roll-back versions)? Is anyone else already doing this; share your code

[Dbix-class] Relationships across different databases

2006-11-22 Thread apv
I ask to save myself a couple of hours of playing with code in case it won't work; just thinking out loud and it seemed like an interesting point either way; sort of forced pair coding. Can I have a relationship across databases? What I'm considering doing is using SQLite for a chat db/table b

Re: [Dbix-class] Use of ->resultset mandatory?

2006-10-30 Thread apv
Before anyone else responds with technical information, I'll say I had exactly the same reaction and it is part of what took me a long time to migrate to DBIC from CDBI. There are many, many gains from the resultset oriented approach and once you get the hang of it there's little to miss about

Re: [Dbix-class] Proper way to escape underscores in DBIC (DBI 101, sorry)

2006-10-13 Thread apv
Oh... wait, I think I was looking at the wrong piece of code. D'oh. Sorry! -Ashley On Friday, Oct 13, 2006, at 11:37 US/Pacific, apv wrote: > The behavior happens on ->search(); on mysql anyway. > > On Friday, Oct 13, 2006, at 11:15 US/Pacific, Matt S Trout wrote: > >>

Re: [Dbix-class] Proper way to escape underscores in DBIC (DBI 101, sorry)

2006-10-13 Thread apv
The behavior happens on ->search(); on mysql anyway. On Friday, Oct 13, 2006, at 11:15 US/Pacific, Matt S Trout wrote: > > On 13 Oct 2006, at 13:36, Ash Berlin wrote: > >> Jules Bean wrote: >>> apv wrote: >>> >>>> I want/need to escape underscor

[Dbix-class] Proper way to escape underscores in DBIC (DBI 101, sorry)

2006-10-11 Thread apv
I want/need to escape underscores so that simple searches can't be "hacked" by users, accidentally or intentionally. The DBI doc shows this as the way to do it: $esc = $dbh->get_info( 14 ); # SQL_SEARCH_PATTERN_ESCAPE $search_pattern =~ s/([_%])/$esc$1/g; Where/how should I do it in (a C

[Dbix-class] "rows" count reflects wrong table when "prefetch" is used

2006-07-19 Thread apv
I must say DBIC is really nice. I had problems migrating to it a few months ago b/c things were in flux (Schema's were just entering and doc-cupboard was a bit bare) so left it alone for awhile. I'm back at it and I was able to replace some CDBI classes in just a few minutes yesterday. I t

Re: [Dbix-class] inflate? select? turning on utf8 for mysql till the dbd is upgraded

2006-02-09 Thread apv
get time in the next couple days, or someone could just straighten me out. :) "Module" attached. -Ashley DBIx-Class-UTF8Columns-0.01.tar.gz Description: GNU Zip compressed data On Thursday, February 9, 2006, at 06:35 AM, Matt S Trout wrote: On Wed, Feb 08, 2006 at 10:50:07PM

[Dbix-class] inflate? select? turning on utf8 for mysql till the dbd is upgraded

2006-02-08 Thread apv
In CDBI for MySQL I'm setting everything to utf8 this way (the tables are utf8 but the DBD doesn't bring the info across): # the base class use Data::Structure::Util qw( _utf8_on ); __PACKAGE__->add_trigger(select => sub { _utf8_on($_[0]) }); How would I go about turning on the utf-8 flag for e