Re: DBIx HAVING and COUNT error

2016-09-04 Thread Ron Savage

Hi Rajeev

On 05/09/16 12:07, Rajeev Prasad via dbi-users wrote:

sorry i didnt understand.

how can this have it?

my $obj_rs = $schema->resultset('itemList')->serach(
{ t_id => { -in => [ $tStr ] }},
{
group_by => [ qw(i_id) ],
HAVING COUNT('t_id') = $tCount
}
);


No. It isn't Perl. And it doesn't match the docs for DBIx::Class.

--
Ron Savage - savage.net.au


Re: DBIx HAVING and COUNT error

2016-09-04 Thread Rajeev Prasad via dbi-users
sorry i didnt understand.

how can this have it?
my $obj_rs = $schema->resultset('itemList')->serach(
                { t_id => { -in => [ $tStr ] }},
                {
                    group_by => [ qw(i_id) ],
                    HAVING COUNT('t_id') = $tCount
                }
            ); 

On Saturday, September 3, 2016 1:37 AM, Ron Savage  
wrote:
 

 Hi Rajeev

On 03/09/16 15:58, Rajeev Prasad wrote:
> I tried what you said and also what manual says, but it is not working
> my tries:
> HAVING => { count('t_id') => $tCount}
> HAVING => {'COUNT_t_id' => {'=', $tCount } }
> HAVING => { count('t_id') => {'=', $tCount } }
>
>  having => { 'count_employee' => { '>=', 100 } }

Those docs tell me that the SQl has to include something like:

'select ... count(t_id) as count_t_id ...

And then the having can be

having => {count_t_id => {'=', $tCount} }

-- 
Ron Savage - savage.net.au


   

Re: DBD::XML

2016-09-04 Thread Nigel Horne



On 09/04/2016 03:41 PM, Tim Bunce wrote:

On Sun, Sep 04, 2016 at 08:33:21AM -0400, Nigel Horne wrote:

On 4/9/16 05:56, Tim Bunce wrote:

So here's an interesting one.  Any thoughts on this?  I assumed it all got
pulled in magically, but I guess I'm missing something.  But what?

http://www.cpantesters.org/cpan/report/f9cbd816-7052-11e6-ab41-c893a58a4b8c

I've not listed DBI as a prerequisite, nor DBI::DBD::SqlEngine (which is
the first thing the module loads) so that test might have been running
with a funky older version.

Thanks, Tim.  The problem is that seems to be the case with a lot of
smokers, not just a few, so I think it's something in need of more
attention.  I've added SQL::Statement to the pre-reqs since I saw that in
some other code (I forget which now), I'll see if that helps.

Why not also add DBI::DBD::SqlEngine (0.06, I think) as a pre-req?
Seems appropriate since that's what the module 'use's.
Great minds think alike, as it were, since I've done that.  Now it 
builds OK on Travis which was patchy beforehand, so I am hoping for the 
best.


Tim.

-Nigel


Re: DBD::XML

2016-09-04 Thread Tim Bunce
On Sun, Sep 04, 2016 at 08:33:21AM -0400, Nigel Horne wrote:
> 
> On 4/9/16 05:56, Tim Bunce wrote:
> > > So here's an interesting one.  Any thoughts on this?  I assumed it all got
> > > pulled in magically, but I guess I'm missing something.  But what?
> > > 
> > > http://www.cpantesters.org/cpan/report/f9cbd816-7052-11e6-ab41-c893a58a4b8c
> > I've not listed DBI as a prerequisite, nor DBI::DBD::SqlEngine (which is
> > the first thing the module loads) so that test might have been running
> > with a funky older version.
> Thanks, Tim.  The problem is that seems to be the case with a lot of
> smokers, not just a few, so I think it's something in need of more
> attention.  I've added SQL::Statement to the pre-reqs since I saw that in
> some other code (I forget which now), I'll see if that helps.

Why not also add DBI::DBD::SqlEngine (0.06, I think) as a pre-req?
Seems appropriate since that's what the module 'use's.

Tim.


Re: DBD::XML

2016-09-04 Thread Nigel Horne


On 4/9/16 05:56, Tim Bunce wrote:

So here's an interesting one.  Any thoughts on this?  I assumed it all got
pulled in magically, but I guess I'm missing something.  But what?

http://www.cpantesters.org/cpan/report/f9cbd816-7052-11e6-ab41-c893a58a4b8c

I've not listed DBI as a prerequisite, nor DBI::DBD::SqlEngine (which is
the first thing the module loads) so that test might have been running
with a funky older version.
Thanks, Tim.  The problem is that seems to be the case with a lot of 
smokers, not just a few, so I think it's something in need of more 
attention.  I've added SQL::Statement to the pre-reqs since I saw that 
in some other code (I forget which now), I'll see if that helps.


Tim.

-Nigel


Re: DBD::XML

2016-09-04 Thread Tim Bunce
On Thu, Sep 01, 2016 at 01:53:52PM -0400, Nigel Horne wrote:
> So here's an interesting one.  Any thoughts on this?  I assumed it all got
> pulled in magically, but I guess I'm missing something.  But what?
> 
> http://www.cpantesters.org/cpan/report/f9cbd816-7052-11e6-ab41-c893a58a4b8c

I've not listed DBI as a prerequisite, nor DBI::DBD::SqlEngine (which is
the first thing the module loads) so that test might have been running
with a funky older version.

Tim.