On Wed, Feb 06, 2008 at 08:29:49PM +0100, Grzegorz Nosek wrote:
> Still, either I'm doing something very stupid, or the columns are now
> always qualified, like this:
>
> SELECT
> t1.id,
> t1.val1,
> t1.val2,
> t1.is_even
> FROM
> test t1
> WHERE
> t1.id = ? AND
> t1.is_even = ? (2,
On Tue, Feb 05, 2008 at 07:04:10PM -0500, John Siracusa wrote:
> On Feb 5, 2008 5:16 PM, Grzegorz Nosek <[EMAIL PROTECTED]> wrote:
> > Hmm, I might be missing something, but inside the
> > sql_qualify_columns_on_load method you're using $_[1] after shifting
> > $self off the argument array, so to s
On Feb 5, 2008 5:16 PM, Grzegorz Nosek <[EMAIL PROTECTED]> wrote:
> Hmm, I might be missing something, but inside the
> sql_qualify_columns_on_load method you're using $_[1] after shifting
> $self off the argument array, so to set the value to true, I must pass
> two arguments to the method
Too sl
Hi,
On Tue, Feb 05, 2008 at 04:18:28PM -0500, John Siracusa wrote:
> On Feb 5, 2008 4:06 PM, Grzegorz Nosek <[EMAIL PROTECTED]> wrote:
> > t/db-objectok 1/566# Looks like you planned 566
> > tests but only ran 562.
>
> Whoops, that should be fixed now.
Yup, it is. You're
On Feb 5, 2008 4:06 PM, Grzegorz Nosek <[EMAIL PROTECTED]> wrote:
> t/db-objectok 1/566# Looks like you planned 566
> tests but only ran 562.
Whoops, that should be fixed now.
> sql_qualify_columns_on_load is on by default. Actually, it looks
> hardcoded to one ($self->{..
On Mon, Feb 04, 2008 at 04:37:11PM -0500, John Siracusa wrote:
> On Feb 4, 2008 3:51 PM, Grzegorz Nosek <[EMAIL PROTECTED]> wrote:
> > Test case attached. It's weird. Help! ;)
>
> Not so weird: it was a simple bug in the boolean method maker. It's
> fixed in SVN now. I'll work on the column name
On Feb 4, 2008 3:51 PM, Grzegorz Nosek <[EMAIL PROTECTED]> wrote:
> Test case attached. It's weird. Help! ;)
Not so weird: it was a simple bug in the boolean method maker. It's
fixed in SVN now. I'll work on the column name qualification option.
-John
--
On Feb 4, 2008 4:05 PM, John Siracusa <[EMAIL PROTECTED]> wrote:
> On Feb 4, 2008 3:51 PM, Grzegorz Nosek <[EMAIL PROTECTED]> wrote:
> > Functions taking rows as arguments may be used like extra table columns
> > only when qualified with a table alias.
>
> Can you use an alternate "normal" function
On Feb 4, 2008 3:51 PM, Grzegorz Nosek <[EMAIL PROTECTED]> wrote:
> Functions taking rows as arguments may be used like extra table columns
> only when qualified with a table alias.
Can you use an alternate "normal" function call form as well?
SELECT id, ..., is_even(...) FROM test;
I'm not
Hi,
On Sun, Feb 03, 2008 at 07:07:34PM -0500, John Siracusa wrote:
> Sorry, actually I should have suggested on_load, but no matter because
> something else is obviously wrong. Can you post a small
> self-contained example including the table definitions and class
> definitions? That's usually t
On Feb 3, 2008 5:07 PM, Grzegorz Nosek <[EMAIL PROTECTED]> wrote:
> __PACKAGE__
> ->meta->column('is_even')
> ->add_trigger('on_set',
> sub {
> unset_column_value_modified( $_[0], 'is_even' )
> });
>
> R::DB::O::Util is imported earlier with :columns
On Sun, Feb 03, 2008 at 04:21:26PM -0500, John Siracusa wrote:
> On Feb 3, 2008 3:59 PM, Grzegorz Nosek <[EMAIL PROTECTED]> wrote:
> > my ($a_foo) = @{ Foo::Manager->get_objects( query => [ id => 5, is_even =>
> > 0 ] ) };
> > $a_foo->v2( 5 );
> > $a_foo->save( changes_only => 1 );
> >
> > After e
On Feb 3, 2008 3:59 PM, Grzegorz Nosek <[EMAIL PROTECTED]> wrote:
> However, the problem arises after calling:
>
> my ($a_foo) = @{ Foo::Manager->get_objects( query => [ id => 5, is_even => 0
> ] ) };
> $a_foo->v2( 5 );
> $a_foo->save( changes_only => 1 );
>
> The is_even condition is a result of
Hi all,
Consider a table with a row function attached (in PostgreSQL), e.g.:
CREATE TABLE foo (id serial PRIMARY KEY,
value int not null,
v2 int not null);
CREATE FUNCTION is_even(foo) RETURNS boolean STABLE STRICT AS $$
SELECT $1.value %2 = 0;
$$ LANGUAGE SQL;
(modulo t
14 matches
Mail list logo