Peter Rabbitson wrote:
Greetings,
The next release of DBIC will have a number of exciting improvements,
among them proper ->count ->update and ->delete of any resultset,
regardless of it's complexity (join, group_by, paging, etc.)
While all of these improvements are logical extensions of the aw
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
Greetings,
The next release of DBIC will have a number of exciting improvements,
among them proper ->count ->update and ->delete of any resultset,
regardless of it's complexity (join, group_by, paging, etc.)
While all of these improvements are logical extensions of the awesome
as_query() feature,
From: Андрей Костенко [mailto:and...@kostenko.name]
Sent: Monday, May 18, 2009 11:38 AM
To: DBIx::Class user and developer list
Subject: Re: [Dbix-class] Increment MySQL field
It is bad.
If my program have more than one thread:
first thread: SELECT balance FROM somewhere ( returns 150 )
second
It is bad.
If my program have more than one thread:
*first thread*: SELECT balance FROM somewhere ( returns 150 )
*second thread* (which works at the same time): SELECT balance FROM
somewhere ( returns 150 )
*first thread*: UPDATE something SET balance=250;
*second thread*: UPDATE something SET ba
Ben Vinnerd wrote on 2009-05-15:
> Hey,
>
> I have the following SQL to increment a field by 100:
>
> update account set balance = balance + 100
>
> I can increment a field with DBIC, like so:
>
> $account->update({balance => \'balance + 100'});
>
> Is there a better/cleaner way of doing this
Chris Cole wrote:
> Peter Rabbitson wrote:
>> Chris Cole wrote:
>>> my $new_album = $schema->resultset('Album')->create({
>>> title => 'Wish You Were Here',
>>> artist => 'Pink Floyd'
>>> });
>>>
>>> Now you can add data to the new record:
>>>
>>> $new_album->label('Capitol');
>>>
Peter Rabbitson wrote:
> Chris Cole wrote:
>> my $new_album = $schema->resultset('Album')->create({
>> title => 'Wish You Were Here',
>> artist => 'Pink Floyd'
>> });
>>
>> Now you can add data to the new record:
>>
>> $new_album->label('Capitol');
>> $new_album->year('1975');
>>
Hi everyone,
With SQLA 2.0 coming closer to reality, there was a substantial effort
to clear up and disambiguate the SQLA 1.x API. One of the remaining
quirks is the -nest operator, which was introduced in version 1.18.
The examples provided in the documentation make no sense from a
usability poin
Chris Cole wrote:
> Peter Rabbitson wrote:
>> Chris Cole wrote:
>>> To clarify. With autocommit 'off', this code:
>>> my $species = $schema->resultset("Species");
>>>
>>> $species->populate([
>>>{ short_name => $shortName,
>>> full_name => $longName,
>>> common_name => $commonName }
>
Hello,
I have several tables in the following form:
definition_table: (key1, key2, serial, date_active, date_inactive, meta1, meta2)
value_table: (key1, keyA, key2, serial, date_active, date_inactive, data1,data2)
The primary key for the definition_table is (key1, key2, serialD) where serial
is
Peter Rabbitson wrote:
> Chris Cole wrote:
>> To clarify. With autocommit 'off', this code:
>> my $species = $schema->resultset("Species");
>>
>> $species->populate([
>>{ short_name => $shortName,
>> full_name => $longName,
>> common_name => $commonName }
>> ]);
>>
>> $species->update
Chris Cole wrote:
> Peter Rabbitson wrote:
>> Chris Cole wrote:
>>> Hi,
>>>
>>> Given this schema:
>
> [snip]
>>> and this code:
>>> my $schema = DB::Schema->connect(stuff);
>>>
>>> my $species = $schema->resultset("Species");
>>>
>>> $species->populate([
>>>{ short_name => $shortName,
>>>
Louis Erickson wrote:
> On Thu, 14 May 2009, Chris Cole wrote:
>
>
>
>> Why does it work fine when I have Autocommit 'on', but get the following
>> error with Autocommit 'off':
>
> I'm surprised no one else has replied. This bit me too when I first
> started with DBIC. It seemed backwards to
Peter Rabbitson wrote:
> Chris Cole wrote:
>> Hi,
>>
>> Given this schema:
[snip]
>> and this code:
>> my $schema = DB::Schema->connect(stuff);
>>
>> my $species = $schema->resultset("Species");
>>
>> $species->populate([
>>{ short_name => $shortName,
>> full_name => $longName,
>> co
15 matches
Mail list logo