Re: [Dbix-class] DynamicSubclass and Preview: conflict?

2010-05-10 Thread luke saunders
On Mon, May 10, 2010 at 11:11 AM, Miquel Ruiz wrote: > On 07/05/2010 18:39, luke saunders wrote: >> >> The test case you sent me offlist is now fixed in svn. That test case >> doesn't mention DynamicSubclass but I presume that it's the same >> problem. Can y

Re: [Dbix-class] DynamicSubclass and Preview: conflict?

2010-05-07 Thread luke saunders
On Fri, May 7, 2010 at 10:40 AM, luke saunders wrote: >> This *is* working: >> my $schema = MyApp::Schema->compose_namespace('MyApp')->connect(@dsn); >> >> This is *not* working: >> my $schema = MyApp::Schema->connect(@dsn); >> >

Re: [Dbix-class] DynamicSubclass and Preview: conflict?

2010-05-07 Thread luke saunders
On Tue, May 4, 2010 at 3:51 PM, Miquel Ruiz wrote: > On 02/05/2010 22:15, Matt S Trout wrote: >> >> You're going to want to break stuff out into stages - first, get out of >> Catalyst code and write yourself a t/ file for your app so once this does >> work you can't accidentally break it again. Se

[Dbix-class] [ANNOUNCE] DBIx::Class::Preview

2009-05-18 Thread luke saunders
I've just released DBIx::Class::Preview which enables you to redirect reads and writes to a separate table when preview mode is active on your DBIC schema. Good for making changes and previewing them before publishing those changes to the main table. http://search.cpan.org/~lsaunders/DBIx-Class-Pr

Re: [Dbix-class] User error? SQLite problem? with DBIx::Class::Fixtures and populate

2008-10-08 Thread luke saunders
On Wed, Oct 8, 2008 at 7:48 PM, luke saunders <[EMAIL PROTECTED]> wrote: > > (Ashley sent me the files offlist) > > Your call to create_ddl_dir is producing an SQL file with this: > > ... > DROP TABLE account; > CREATE TABLE account ( > ... > > But tha

Re: [Dbix-class] User error? SQLite problem? with DBIx::Class::Fixtures and populate

2008-10-08 Thread luke saunders
On Wed, Oct 8, 2008 at 12:56 AM, luke saunders <[EMAIL PROTECTED]>wrote: > On Tue, Oct 7, 2008 at 6:22 PM, Ashley <[EMAIL PROTECTED]> wrote: > >> I'm messing around with writing some tests with DBIx::Class::Fixtures and >> getting stuck. Trying to see if it

Re: [Dbix-class] User error? SQLite problem? with DBIx::Class::Fixtures and populate

2008-10-07 Thread luke saunders
On Tue, Oct 7, 2008 at 6:22 PM, Ashley <[EMAIL PROTECTED]> wrote: > I'm messing around with writing some tests with DBIx::Class::Fixtures and > getting stuck. Trying to see if it's something obvious I'm doing wrong or > there is currently an sqlite problem. The code below runs fine except the > fi

Re: [Dbix-class] Selecting max() of count()

2008-08-01 Thread luke saunders
On Wed, Jul 30, 2008 at 1:55 PM, BUNK (Jacob Bunk Nielsen) <[EMAIL PROTECTED]> wrote: > Hi > > I'm using PostgreSQL 8.2 and DBIx-Class 0.08007. > > Let's say I have a shop table with a basket_id (identifying a shopping > basket) and an item_id (identifying an item in a basket). Now I want to > find

Re: [Dbix-class] Re: Versioned Cluelessness

2008-07-28 Thread luke saunders
On Mon, Jul 28, 2008 at 3:01 AM, Christopher Laco <[EMAIL PROTECTED]> wrote: > Here's the usage scenarios I'm trying to fix: > >> cake schema run create >> manage.py syncdb >> rake db:migrate > > Things like deploy/upgrade are a lot easier and more obvious in other > frameworks. So how do the othe

Re: [Dbix-class] Versioned Cluelessness

2008-07-09 Thread luke saunders
On Wed, Jul 9, 2008 at 1:22 AM, Ash Berlin <[EMAIL PROTECTED]> wrote: > > On 9 Jul 2008, at 01:13, luke saunders wrote: > >> On Wed, Jul 9, 2008 at 12:54 AM, Christopher Laco <[EMAIL PROTECTED]> >> wrote: >>> >>> Christopher Laco wrote: >>&

Re: [Dbix-class] Versioned Cluelessness

2008-07-08 Thread luke saunders
On Wed, Jul 9, 2008 at 12:54 AM, Christopher Laco <[EMAIL PROTECTED]> wrote: > Christopher Laco wrote: >> >> luke saunders wrote: >>>>>> >>>>>> NOTE: Since SQL::Translator 0.09000 it is better to just run all >>>>>> stat

Re: [Dbix-class] Versioned Cluelessness

2008-07-08 Thread luke saunders
On Wed, Jul 9, 2008 at 12:48 AM, Christopher Laco <[EMAIL PROTECTED]> wrote: > luke saunders wrote: >>>>> >>>>> NOTE: Since SQL::Translator 0.09000 it is better to just run all >>>>> statmets >>>>> in the order given, since the

Re: [Dbix-class] Versioned Cluelessness

2008-07-08 Thread luke saunders
On Tue, Jul 8, 2008 at 3:57 PM, Christopher H. Laco <[EMAIL PROTECTED]> wrote: > luke saunders wrote: >> What do you propose? > > Honestly? > > dbicadmin on steroids. > > dbicadmin --init MySchema > dbicadmin --deploy MySchema dsn > dbicadmin --upgrade MySc

Re: [Dbix-class] Versioned Cluelessness

2008-07-08 Thread luke saunders
On Tue, Jul 8, 2008 at 2:31 PM, Christopher H. Laco <[EMAIL PROTECTED]> wrote: > luke saunders wrote: >> >> On Tue, Jul 8, 2008 at 1:36 PM, Christopher H. Laco <[EMAIL PROTECTED]> >> wrote: >>> >>> luke saunders wrote: >>>> >&g

Re: [Dbix-class] Versioned Cluelessness

2008-07-08 Thread luke saunders
On Tue, Jul 8, 2008 at 1:36 PM, Christopher H. Laco <[EMAIL PROTECTED]> wrote: > luke saunders wrote: >> >> if the db isn't versioned then it's assumed that the database is >> already at the current version and all that happens is that the >> versioned

Re: [Dbix-class] Versioned Cluelessness

2008-07-08 Thread luke saunders
On Tue, Jul 8, 2008 at 4:49 AM, Christopher Laco <[EMAIL PROTECTED]> wrote: > Christopher Laco wrote: >> What has me stumnped is the initial deploy. If I simply do: >> >> $schema->connect('dbi:SQLite:database.db')->upgrade; >> >> I get warnings about the db not being versioned, and then the versio

Re: [Dbix-class] Versioned Cluelessness

2008-07-08 Thread luke saunders
>>> NOTE: Since SQL::Translator 0.09000 it is better to just run all statmets >>> in the order given, since the SQL produced is of better quality. >> > > Hmmm yeah, I briefly toyed with idea of removing that regexp check and just > running stmts the order that the appear in the SQL file, probably f

Re: [Dbix-class] Recursive update_or_create - RFC

2008-06-25 Thread luke saunders
On Mon, Jun 23, 2008 at 7:17 PM, Zbigniew Lukasiak <[EMAIL PROTECTED]> wrote: > On Mon, Jun 23, 2008 at 7:49 PM, luke saunders <[EMAIL PROTECTED]> wrote: >> On Mon, Jun 23, 2008 at 9:57 AM, Zbigniew Lukasiak <[EMAIL PROTECTED]> wrote: >>> On Mon, Jun 23, 200

Re: [Dbix-class] Recursive update_or_create - RFC

2008-06-23 Thread luke saunders
On Mon, Jun 23, 2008 at 9:57 AM, Zbigniew Lukasiak <[EMAIL PROTECTED]> wrote: > On Mon, Jun 23, 2008 at 12:23 AM, luke saunders <[EMAIL PROTECTED]> wrote: >> On Sun, Jun 22, 2008 at 3:21 PM, luke saunders <[EMAIL PROTECTED]> wrote: >>> On Sat, Jun 21, 2008 a

Re: [Dbix-class] Recursive update_or_create - RFC

2008-06-22 Thread luke saunders
On Sun, Jun 22, 2008 at 3:21 PM, luke saunders <[EMAIL PROTECTED]> wrote: > On Sat, Jun 21, 2008 at 9:45 PM, Zbigniew Lukasiak <[EMAIL PROTECTED]> wrote: >> On Sat, Jun 21, 2008 at 10:09 PM, luke saunders <[EMAIL PROTECTED]> wrote: >>> On Sat, Jun 21, 2008 a

Re: [Dbix-class] Recursive update_or_create - RFC

2008-06-22 Thread luke saunders
On Sat, Jun 21, 2008 at 9:45 PM, Zbigniew Lukasiak <[EMAIL PROTECTED]> wrote: > On Sat, Jun 21, 2008 at 10:09 PM, luke saunders <[EMAIL PROTECTED]> wrote: >> On Sat, Jun 21, 2008 at 4:05 PM, Zbigniew Lukasiak <[EMAIL PROTECTED]> wrote: >>> On Sat, Jun 21, 20

Re: [Dbix-class] Recursive update_or_create - RFC

2008-06-21 Thread luke saunders
On Sat, Jun 21, 2008 at 4:05 PM, Zbigniew Lukasiak <[EMAIL PROTECTED]> wrote: > On Sat, Jun 21, 2008 at 4:44 PM, luke saunders <[EMAIL PROTECTED]> wrote: >> On Sat, Jun 21, 2008 at 1:51 PM, Zbigniew Lukasiak <[EMAIL PROTECTED]> wrote: >>> On Sat, Jun 21, 20

Re: [Dbix-class] Recursive update_or_create - RFC

2008-06-21 Thread luke saunders
On Sat, Jun 21, 2008 at 1:51 PM, Zbigniew Lukasiak <[EMAIL PROTECTED]> wrote: > On Sat, Jun 21, 2008 at 1:51 PM, luke saunders <[EMAIL PROTECTED]> wrote: >> On Thu, Jun 19, 2008 at 1:29 PM, Zbigniew Lukasiak <[EMAIL PROTECTED]> wrote: >>> In the attachments

Re: [Dbix-class] Recursive update_or_create - RFC

2008-06-21 Thread luke saunders
On Thu, Jun 19, 2008 at 1:29 PM, Zbigniew Lukasiak <[EMAIL PROTECTED]> wrote: > In the attachments you'll find DBIx::Class::ResultSet::RecursivePUT - > it is a base class for ResultSets and it provides just one method: > recursive_PUT which works just like update_or_create - but can update > a who

Re: [Dbix-class] Caching DBIx-Class Fixtures

2008-06-18 Thread luke saunders
On Wed, Jun 18, 2008 at 2:36 PM, Ovid <[EMAIL PROTECTED]> wrote: > --- luke saunders <[EMAIL PROTECTED]> wrote: > >> Ditching the database and then recreating it for each test is the >> right thing to do in the general case since previous tests might have >>

Re: [Dbix-class] Caching DBIx-Class Fixtures

2008-06-18 Thread luke saunders
On Wed, Jun 18, 2008 at 1:59 PM, Ovid <[EMAIL PROTECTED]> wrote: > --- Ash Berlin <[EMAIL PROTECTED]> wrote: > >> First thing I'd suggest is to look at DBIx::Class::Fixtures and see >> how close it comes to your needs. (I'm guessing you haven't looked at > >> it yet judging by your useperl post) >

Re: [Dbix-class] RFC: Name and comments on my new module.

2008-05-20 Thread luke saunders
On Tue, May 20, 2008 at 2:32 AM, John Napiorkowski <[EMAIL PROTECTED]> wrote: > Hi, > > I need help for my module name, hoping for someone's creative insight. Also > would enjoy any comments. This is a DBIC::Schema component and stand alone > class this is like a $schema->populate on steroids.

Re: [Dbix-class] DBIx::Class::Fixtures suggestions/patches

2008-05-19 Thread luke saunders
On Mon, May 19, 2008 at 4:32 PM, Drew Taylor <[EMAIL PROTECTED]> wrote: > On Mon, May 19, 2008 at 2:10 PM, luke saunders <[EMAIL PROTECTED]> wrote: >> >> My thinking is that either we make the path to the dump executable >> configurable and then have DB specif

Re: [Dbix-class] DBIx::Class::Fixtures suggestions/patches

2008-05-19 Thread luke saunders
On Mon, May 19, 2008 at 10:11 AM, Drew Taylor <[EMAIL PROTECTED]> wrote: > (warning long post) > > I have written a Fixtures wrapper for my particular workflow for use > at $work, along with some customizations to D::C::Fixtures and wanted > to get opinions about pushing them to svn. To get a big p

Re: [Dbix-class] SQL::Translator::Parser::DBIx::Class unique symbol change

2008-05-16 Thread luke saunders
On Thu, May 15, 2008 at 6:53 PM, Ryan D Johnson <[EMAIL PROTECTED]> wrote: > "John Goulah" <[EMAIL PROTECTED]> writes: > >> On Thu, May 15, 2008 at 9:40 AM, luke saunders <[EMAIL PROTECTED]> wrote: >>> On Thu, May 15, 2008 at 2:24 PM, Ash Berlin &l

Re: [Dbix-class] SQL::Translator::Parser::DBIx::Class unique symbol change

2008-05-15 Thread luke saunders
On Thu, May 15, 2008 at 2:24 PM, Ash Berlin <[EMAIL PROTECTED]> wrote: > > On 15 May 2008, at 14:08, luke saunders wrote: >> >> What were these cases? Is that not just a bug with the unique symbol >> generator in the producer? > > I'm not sure of the exact

Re: [Dbix-class] SQL::Translator::Parser::DBIx::Class unique symbol change

2008-05-15 Thread luke saunders
On Thu, May 15, 2008 at 1:48 PM, Ash Berlin <[EMAIL PROTECTED]> wrote: > > On 15 May 2008, at 13:28, luke saunders wrote: > >> The change shown here: >> >> http://dev.catalyst.perl.org/svnweb/bast/diff/DBIx-Class/0.08/trunk/lib/SQL/Translator/Parser/DBIx/Clas

[Dbix-class] SQL::Translator::Parser::DBIx::Class unique symbol change

2008-05-15 Thread luke saunders
The change shown here: http://dev.catalyst.perl.org/svnweb/bast/diff/DBIx-Class/0.08/trunk/lib/SQL/Translator/Parser/DBIx/Class.pm?rev1=4247;rev2=4248 Is causing many constraint add/drops in our schema diff such as: ALTER TABLE table_name DROP FOREIGN KEY table_name_fk_fk_user_id, ADD

Re: [Dbix-class] Relations on non in_storage rows (my todays gotcha)

2008-05-11 Thread luke saunders
On Sun, May 11, 2008 at 5:48 PM, Zbigniew Lukasiak <[EMAIL PROTECTED]> wrote: > On Sun, May 11, 2008 at 4:34 PM, Matt S Trout <[EMAIL PROTECTED]> wrote: >> On Sun, May 11, 2008 at 12:06:54PM +0200, Zbigniew Lukasiak wrote: >>> If you have a new object, not yet in the database, like: >>> >>> $new_cd

Re: [Dbix-class] Path roundup, mark II

2008-04-25 Thread luke saunders
On Fri, Apr 25, 2008 at 5:13 PM, Peter Rabbitson <[EMAIL PROTECTED]> wrote: > Matt S Trout wrote: > > > On Wed, Apr 23, 2008 at 10:20:16PM +0200, Peter Rabbitson wrote: > > > > > Matt S Trout wrote: > > > > > > > Anything left or do we start cutting 08100 dev releases? > > > > > > > > (the "single

Re: [Dbix-class] DBIx::Class::Fixtures speedup

2008-04-25 Thread luke saunders
On Fri, Apr 25, 2008 at 5:00 AM, Jason Kohles <[EMAIL PROTECTED]> wrote: > > On Apr 24, 2008, at 6:54 AM, luke saunders wrote: > > > > On Wed, Apr 23, 2008 at 8:42 PM, Matt S Trout <[EMAIL PROTECTED]> > wrote: > > > > > On Wed, Apr

Re: [Dbix-class] DBIx::Class::Fixtures speedup

2008-04-24 Thread luke saunders
On Wed, Apr 23, 2008 at 8:42 PM, Matt S Trout <[EMAIL PROTECTED]> wrote: > On Wed, Apr 23, 2008 at 04:37:54PM +0100, Drew Taylor wrote: > > > What if you used link() instead of a copy? > > > > > > Or just make the dump code make the tmp dir, and populate open a file > handle > > > to everyt

Re: [Dbix-class] DBIx::Class::Fixtures speedup

2008-04-23 Thread luke saunders
On Wed, Apr 23, 2008 at 12:14 PM, Drew Taylor <[EMAIL PROTECTED]> wrote: > I'm using Fixtures in my app, and am overall pleased with it. But I > now have a couple thousand fixture items which are imported, and > that's taking upwards of 1min+. Out of curiosity I commented out the > creation of t

Re: [Dbix-class] 08100: branch roundup, owners please respond.

2008-03-11 Thread luke saunders
On Tue, Mar 11, 2008 at 3:45 AM, Matt S Trout <[EMAIL PROTECTED]> wrote: > versioned and cdbicompat are merged to trunk. > > that leaves - > > alias_length_limit > bindtype_ensure_connected > file_column > jdbicompat > oracle_sequence > storage-ms-access > > Where are these up to? i initia

Re: [Dbix-class] RFC: DBIx::Class::Fixtures

2008-02-06 Thread luke saunders
Indeed. They can also be useful if you want each of your developers to work against their own development database rather than sharing one. If your prod db is too large to be practical to replicate x times then it can be useful to have a fixture set to populate the dev databases with. On Feb 6, 20

[Dbix-class] RFC: DBIx::Class::Fixtures

2008-02-05 Thread luke saunders
I have factored out some custom fixture code into what is hopefully a module useful to others - DBIx::Class::Fixtures. If you have any interest in using fixtures for your test suites or dev databases please give this module a quick review so that we can hammer out issues before releasing version 1.

Re: [Dbix-class] Second join gets eaten in _merge_attr

2007-10-29 Thread luke saunders
my bad. fixed in trunk: http://dev.catalystframework.org/svnweb/bast/revision/?rev=3844 thanks for the test. On 10/29/07, Zbigniew Lukasiak <[EMAIL PROTECTED]> wrote: > When you have a resultset that has a join in it and you try to do a > search on it with another join to the same table twice the

[Dbix-class] Patch and test for DBIx::Class storage->connected() bug

2007-08-07 Thread luke saunders
There is a bug in method connected of DBIx::Class::Storage::DBI: it doesn't check that $dbh is still valid after it has called $self->_verify_pid. _verify_pid() will invalidate $dbh if the connection has been created in a different process (the parent). Here is a patch with a potential fix and a t