I tried -delete and -delete_all both operation was deleting one by one.
The version of DBIx::Class is 0.08250
You guessed right :) I had changed the table name but the code is no
different, here is the code and schema definition of $rs
$schema-resultset('AlertParameterValue')-search({ProfileId =
Read the documentation for PgLog:
https://metacpan.org/pod/DBIx::Class::ResultSet::PgLog#delete - it
forces -delete_all behavior
On Fri, Aug 29, 2014 at 2:41 PM, Sheeju Alex sheeju...@gmail.com wrote:
I tried -delete and -delete_all both operation was deleting one by one.
The version of
Thanks William.. I checked everywhere else completely forgot about PgLog :)
I will debug and try to fix at PgLog module, my expectation of PgLog was to
use it only if the query is wrapped around with txn_do.
Best Regards,
Sheeju Alex
On Sat, Aug 30, 2014 at 6:02 AM, William Cox
Hi All,
Is there any way in DBIx to delete all rows from resultset in a single
query, it looks like delete and delete_all will delete the resultset row by
row.
my $rs = $schema-resultset('User')-search({GroupId = 712});
$rs-delete_all;
If there are 100 Users in User table then the above
$schema-resultset('User')-search({GroupId = 712})-delete;
On 28 August 2014 13:01, Sheeju Alex sheeju...@gmail.com wrote:
Hi All,
Is there any way in DBIx to delete all rows from resultset in a single
query, it looks like delete and delete_all will delete the resultset row by
row.
my
No This doesn't work since DBIx converts this into below quries
SELECT * FROM User WHERE GroupId = 712;
SELECT * FROM User WHERE Id = 1;
DELETE FROM User WHERE Id = 1;
SELECT * FROM User WHERE Id = 2;
DELETE FROM User WHERE Id = 2;
SELECT * FROM User WHERE Id = 3;
DELETE FROM User WHERE Id = 3;
You must have something wrong in DBIx relationship, many be in part:
{ is_deferrable = 1, on_delete = CASCADE, on_update = CASCADE },
try this:
my $sql = $schema-resultset('User')-search({GroupId = 712});
$schema-resultset('User')-search({
Id = { IN = $sql-get_column('Id')-as_query },
On Sat, Feb 23, 2013 at 03:58:20AM +1100, Peter Rabbitson wrote:
On Fri, Feb 22, 2013 at 04:46:46PM +, Chisel wrote:
At work we had to freeze our DBIC at 0.08196 until the prefetch/namespace
bug was fixed ... which it was recently.
Internally we've built the new perl+cpandeps RPM
At work we had to freeze our DBIC at 0.08196 until the prefetch/namespace
bug was fixed ... which it was recently.
Internally we've built the new perl+cpandeps RPM including DBIx::Class
0.08206. Things are looking great for the prefetch/namespace fix but
something has come to light this week that
On Fri, Feb 22, 2013 at 04:46:46PM +, Chisel wrote:
At work we had to freeze our DBIC at 0.08196 until the prefetch/namespace
bug was fixed ... which it was recently.
Internally we've built the new perl+cpandeps RPM including DBIx::Class
0.08206. Things are looking great for the
On Fri, Feb 22, 2013 at 4:58 PM, Peter Rabbitson rabbit+d...@rabbit.us wrote:
The test is comprehensive enough, no further questions. It would be
great if you could convert it to a DBIC-internal test, for example based
off of:
I've just released Search::Query::Dialect::DBIxClass to CPAN [1].
It uses Search::Query to parse a query string and transforms it into a hashref
than can be passed to $rs-search(_rs).
The Search::Query::Parser synopsis shows the valid operators and prefixes.
You can use it to enable users to
here is given string of type:... as23,rt54,yh79
and i have to lookup in a table which has column id which has only one four
letter word. i have to select that row in which the colum 'id' value matches
any of the word in given string...
table column: id
contents like:
| id|
|sd32|
|wa32|
Maybe something like this will do:
my $str = 'as23,rt54,yh79';
$schema-resultset('MyTable')
-search({ id=[ split /,/ = $str ] });
regards,
rodrigo
On Sat, Aug 11, 2012 at 6:05 PM, Rajeev Prasad rp.ne...@yahoo.com wrote:
here is given string of type:... as23,rt54,yh79
and i have to
: [Dbix-class] search any matching word in given string in table
column which has only one word
Maybe something like this will do:
my $str = 'as23,rt54,yh79';
$schema-resultset('MyTable')
-search({ id=[ split /,/ = $str ] });
regards,
rodrigo
On Sat, Aug 11, 2012 at 6:05 PM, Rajeev Prasad
-Original Message-
From: Peter Rabbitson [mailto:rabbit+d...@rabbit.us]
Sent: Monday, April 05, 2010 8:41 PM
To: DBIx::Class user and developer list
Subject: Re: [Dbix-class] Search with complex joins generating bad SQL
On Mon, Apr 05, 2010 at 10:55:08AM -0700, Byron Young wrote
Byron Young wrote:
Hello,
I have a search that's generating SQL that causes MySQL to barf. I'm using
DBIC v0.08120. Here is the search call:
$schema-resultset(Results)-search({
'hostname_2.name' = {
'=' = 'gen-cs167'
}
}, {
join = [
Hello,
I have a search that's generating SQL that causes MySQL to barf. I'm using
DBIC v0.08120. Here is the search call:
$schema-resultset(Results)-search({
'hostname_2.name' = {
'=' = 'gen-cs167'
}
}, {
join = [
{
2010/3/23 Hetényi Csaba csabiw...@tata.hu:
my $rs = $c-model('DB::Users')-search(
{
nem = $nem,
megye = $megye,
},
);
BUT, if the user wants to see all of the rows (but the 'nem' clause still
applied) what have to put in
$megye?
(i tried LIKE, %
Dear Members
I look for info about in subject.
I have a table, which has an integer data-type column (in the example:
megye).
I'd like to search for specific value (for ex.: nem = 1, megye = 5) and
it works perfectly
with the following code :
my $rs = $c-model('DB::Users')-search(
Thank You Rob, it is exactly what i want!
Works perfectly :)
Now it is clear, that i'm an absolute beginner :)
Rob Kinyon írta:
2010/3/23 Hetényi Csaba csabiw...@tata.hu:
my $search_clause = { nem = $nem };
if ( $megye ) { $search_clause-{megye} = $megye; }
my $rs =
I'd chain resultsets, that's exactly what the feature it was built for:
my $rs = $c-model('Users')-search({ nem = $nem });
if ( $megye ) {
$rs = $rs-search({ megye = $megye });
}
--
Best regards, Alex
Am Dienstag, den 23.03.2010, 15:31 +0100 schrieb Hetényi Csaba:
Thank You Rob, it is
Is it possible to do a search on a field where it is not equal to a list
of values.
For example, the sql I would like to produce is as follows:
WHERE id NOT IN (?,?,?)
however doing:
-search({
id = { '!=', \...@id_list }
});
doesn't do the right thing as you get:
WHERE id != ? OR id != ?
Stuart Dodds stu...@doddsweb.co.uk wrote:
Is it possible to do a search on a field where it is not equal to a list
of values.
For example, the sql I would like to produce is as follows:
WHERE id NOT IN (?,?,?)
however doing:
-search({
id = { '!=', \...@id_list }
});
doesn't do the right
On Thu, May 15, 2008 at 09:54:45PM +0100, Aaron Crane wrote:
This works:
my $rs = $schema-resultset('CD')-search(
{ artist = 1 },
{ order_by = 'id' },
);
Oddly, so does this:
my $rs = $schema-resultset('CD')-search(
{ artist = 1 },
undef,
This works:
my $rs = $schema-resultset('CD')-search(
{ artist = 1 },
{ order_by = 'id' },
);
Oddly, so does this:
my $rs = $schema-resultset('CD')-search(
{ artist = 1 },
undef,
{ order_by = 'id' },
);
I'm finding it hard to imagine
It seems that a search() is returning an array of \bless'ed instead of
bless'ed objects.
I'm putting in a die to dump out am example:
Caught exception in IDL::Web::Controller::SP::Companies-edit SPC:
REF(0xa9328f4) = REF at
On Feb 18, 2008 4:12 PM, Paul Makepeace [EMAIL PROTECTED] wrote:
It seems that a search() is returning an array of \bless'ed instead of
bless'ed objects.
I'm putting in a die to dump out am example:
Caught exception in IDL::Web::Controller::SP::Companies-edit SPC:
REF(0xa9328f4) = REF at
On Monday 18 February 2008 16:12:24 Paul Makepeace wrote:
It seems that a search() is returning an array of \bless'ed instead of
bless'ed objects.
I'm putting in a die to dump out am example:
Caught exception in IDL::Web::Controller::SP::Companies-edit SPC:
REF(0xa9328f4) = REF at
On 2/18/08, Matthias Zeichmann [EMAIL PROTECTED] wrote:
On Feb 18, 2008 4:12 PM, Paul Makepeace [EMAIL PROTECTED] wrote:
It seems that a search() is returning an array of \bless'ed instead of
bless'ed objects.
I'm putting in a die to dump out am example:
Caught exception in
I asked a long time back about engine specific escape sequences to
sanitize LIKE queries. I got pointed to a neat snippet from the DBI
docs but mostly heard don't use search (or search_like).
$esc = $dbh-get_info( 14 ); # SQL_SEARCH_PATTERN_ESCAPE
$search_pattern =~
31 matches
Mail list logo