Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

class::dbi::plugin::abstractcount(3pm) [debian man page]

AbstractCount(3pm)					User Contributed Perl Documentation					AbstractCount(3pm)

NAME
Class::DBI::Plugin::AbstractCount - get COUNT(*) results with abstract SQL SYNOPSIS
use base 'Class::DBI'; use Class::DBI::Plugin::AbstractCount; my $count = Music::Vinyl->count_search_where( { artist => 'Frank Zappa' , title => { like => '%Shut Up 'n Play Yer Guitar%' } , released => { between => [ 1980, 1982 ] } }); DESCRIPTION
This Class::DBI plugin combines the functionality from Class::DBI::Plugin::CountSearch (counting objects without having to use an array or an iterator), and Class::DBI::AbstractSearch, which allows complex where-clauses a la SQL::Abstract. METHODS
count_search_where Takes a hashref with the abstract where-clause. An additional attribute hashref can be passed to influence the default behaviour: arrayrefs are OR'ed, hashrefs are AND'ed. TODO
More tests, more doc. SEE ALSO
SQL::Abstract for details about the where-clause and the attributes. Class::DBI::AbstractSearch Class::DBI::Plugin::CountSearch AUTHOR
Jean-Christophe Zeus, <mail@jczeus.com> with some help from Tatsuhiko Myagawa and Todd Holbrook. COPYRIGHT AND LICENSE
Copyright (C) 2004 by Jean-Christophe Zeus This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.10.0 2009-07-01 AbstractCount(3pm)

Check Out this Related Man Page

Class::DBI::Search::Basic(3pm)				User Contributed Perl Documentation			    Class::DBI::Search::Basic(3pm)

NAME
Class::DBI::Search::Basic - Simple Class::DBI search SYNOPSIS
my $searcher = Class::DBI::Search::Basic->new( $cdbi_class, @search_args ); my @results = $searcher->run_search; # Over in your Class::DBI subclass: __PACKAGE__->add_searcher( search => "Class::DBI::Search::Basic", isearch => "Class::DBI::Search::Plugin::CaseInsensitive", ); DESCRIPTION
This is the start of a pluggable Search infrastructure for Class::DBI. At the minute Class::DBI::Search::Basic doubles up as both the default search within Class::DBI as well as the search base class. We will probably need to tease this apart more later and create an abstract base class for search plugins. METHODS
new my $searcher = Class::DBI::Search::Basic->new( $cdbi_class, @search_args ); A Searcher is created with the class to which the results will belong, and the arguments passed to the search call by the user. opt if (my $order = $self->opt('order_by')) { ... } The arguments passed to search may contain an options hash. This will return the value of a given option. run_search my @results = $searcher->run_search; my $iterator = $searcher->run_search; Actually run the search. SUBCLASSING
sql / bind / fragment The actual mechanics of generating the SQL and executing it split up into a variety of methods for you to override. run_search() is implemented as: return $cdbi->sth_to_objects($self->sql, $self->bind); Where sql() is $cdbi->sql_Retrieve($self->fragment); There are also a variety of private methods underneath this that could be overridden in a pinch, but if you need to do this I'd rather you let me know so that I can make them public, or at least so that I don't remove them from under your feet. perl v5.12.4 2011-08-10 Class::DBI::Search::Basic(3pm)
Man Page

5 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perl question - looping through an array of hashrefs

I have an array of hashrefs that look like the following: my @LAYOUT = ( {SQL_1 => "select count (*) FROM prospect WHERE PROCESS_DATE = To_date('INSERT_DATE_HERE', 'mm/dd/yyyy') and tiff_filename is not null ... (2 Replies)
Discussion started by: kregh99
2 Replies

2. Shell Programming and Scripting

Help need in Deleting Characters

Hi, I have a log file whose size is number of characters in the file with multiple lines. Example: SQL*Loader: Release 10.2.0.4.0 - Production on Sat Sep 12 07:55:29 2009 Copyright (c) 1982, 2007, Oracle. All rights reserved. Control File: ../adm/ctl/institution.ctl Character Set... (4 Replies)
Discussion started by: rajeshorpu
4 Replies

3. Shell Programming and Scripting

How to grep the where clause of a SQL?

Hi UNIX Gurus, I want to use extract the where clause of a SQL present in a file. Please suggest me how can I do it. Select * from emp where emp_id>10; cat <file_name> | grep -i "where" returns whole SQL. how can I extract only "where emp_id>10;" Thanks in advance (4 Replies)
Discussion started by: ustechie
4 Replies

4. Shell Programming and Scripting

How to extract WHERE clause from a SQL using UNIX???

Hi, I need to know how to extract entire WHERE clause from a SQL statement using UNIX command. For example: If following is the SQL then how to extract entire WHERE clause: UPDATE <TABLE_NAME_1> SET <FIELD_NAME> = VALUE WHERE CONDITION_1 AND CONDITION_2 = (SELECT FIELD_NAME FROM... (15 Replies)
Discussion started by: ustechie
15 Replies

5. Shell Programming and Scripting

Perl DBI error

Hi All, I installed DBI module in a non INC location and using it in my script via "use lib". But it throw the below error at the "use DBI" step. Please help Usage: DBI::_install_method(dbi_class, meth_name, file, attribs=Nullsv) at /xx/xxx/xxxxx/xxxxx/oracle/lib/DBI.pm/oracle/lib/DBI.pm line... (2 Replies)
Discussion started by: prasperl
2 Replies