Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

class::dbi::search::basic(3pm) [debian 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)

Check Out this Related Man Page

Class::DBI::Cascade::None(3pm)				User Contributed Perl Documentation			    Class::DBI::Cascade::None(3pm)

NAME
Class::DBI::Cascade::None - Do nothing upon deletion DESCRIPTION
This is a Cascading Delete strategy that will do nothing, leaving orphaned records behind. It is the base class for most ofther Cascade strategies, and so provides several important methods: CONSTRUCTOR
new my $strategy = Cascade::Class->new($Relationship); This must be instantiated with a Class::DBI::Relationship object. METHODS
foreign_for my $iterator = $strategy->foreign_for($obj); This will return all the objects which are foreign to $obj across the relationship. It's a normal Class::DBI search you can get the results either as a list or as an iterator. cascade $strategy->cascade($obj); Cascade across the related objects to $obj. WRITING NEW STRATEGIES
Creating a Cascade strategy should be fairly simple. You usually just need to inherit from here, and then supply a cascade() method that does the required thing with the results from foreign_for(). So, for example, Cascade::Delete is implemented simply as: package Class::DBI::Cascade::Delete; use base 'Class::DBI::Cascade::None'; sub cascade { my ($self, $obj) = @_; $self->foreign_for($obj)->delete_all; } perl v5.12.4 2005-09-14 Class::DBI::Cascade::None(3pm)
Man Page

15 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

File Search

I hope I can outline this clearly the first time. I have been asked to create a script to do the following: Search a series of Directories that have been created withing 15 minutes of the current system time for a dynamic file name that ends in (dot)out .out. If a file with that extension is... (9 Replies)
Discussion started by: mikevanhoff
9 Replies

2. UNIX for Dummies Questions & Answers

Simple? Search replace

in vi, if i type ctrl-J, i can shift the next line up to the current line. I need to do this whenever a specific string exists (in particular ^M) ,however i have not been able to find a way to do this in vi, sed, or awk seems simple enough. can someone help me? thanks in advance (9 Replies)
Discussion started by: Brandt
9 Replies

3. Shell Programming and Scripting

any possible to run sql result and output to file

Hi, I search all post...and no soluation about..if i would like to run a sql statement and output the result to txt file. for example, i usually run "sql" to logon the database and run select statement. Then I need to copy the output into the result.txt. Can I run the script to do this... (7 Replies)
Discussion started by: happyv
7 Replies

4. Shell Programming and Scripting

Search string and return only the 5th line

I have looked at almost every posting on here regarding, grep, sed, awk, nawk, perl methods to perform this function, but they are just not returning the results I hope to see. Example File: abcdef 123456 ghijkl 7890123 7890123 7890123 7890123 mnopqrs 456789 This is the most... (4 Replies)
Discussion started by: doza22
4 Replies

5. UNIX for Dummies Questions & Answers

Search for string and return lines above and below

Hi, I have a file with the following contents: COMPANY ABCD TRUCKER JOE SMITH TRUCK 456 PLATE A12345678 TRUCKER BILL JONES TRUCK 789 PLATE B7894561 I need to create a script or search command that will search for this string '789' in the file. This string is unique and only... (7 Replies)
Discussion started by: doza22
7 Replies

6. Shell Programming and Scripting

Search 3 words

Hi All, I have almost 1000+ files and I want to search specific pattern. Looking forwarded your input. Pls note that need to ignore words in between /* */ Search for: "insert into xyz" (Which procedure contain all 3). Expected output: procedure test1 procedure test2 procedure test3 File... (12 Replies)
Discussion started by: susau_79
12 Replies

7. Programming

Search Engine in C

Hello everybody, I need help with this, I need to design a CGI search engine in C but i have no idea on what or how to do it. Do i have to open all the html files one by one and search for the given strings? i think this process will be slow, and will take too much of the server processing... (11 Replies)
Discussion started by: semash!
11 Replies

8. UNIX for Dummies Questions & Answers

Search string

I need to create a search string to search through 3 files in my directory called book1, book2, and book3. The search would need to look for the words "title" or "Title" in the above files. I know very little about unix but I know that you have to use some form of wildcards in the pattern and... (5 Replies)
Discussion started by: vthokiefan
5 Replies

9. UNIX for Advanced & Expert Users

Search for an exact string in a Terminal

Is there hopefully a way to search for an exact string in Man Pages? I know if I want to search for anything containing -c I can just do this. /-c How would I search for "-c"? I want only "-c" to show up. So I tried this. /"-c" It took me literally and looked for the quotes also. (13 Replies)
Discussion started by: cokedude
13 Replies

10. Shell Programming and Scripting

Multi-Line Search and Replace

There appears to be several threads that touch on what I'm trying to do, but nothing quite generic enough. What I need to do is search through many (poorly coded) HTML files and make changes. The catch is that my search string may be on one line or may be on several lines. For example there... (5 Replies)
Discussion started by: bisbell
5 Replies

11. Shell Programming and Scripting

Executing Procedure from shell script..

Hello, I created a sql file to create a Procedure, and it was successfully created. I created a sql file to execute the procedure, and it did without any errors, but i dont see the data been updated. The Execute procedure.sql script is: BEGIN set serveroutput on size 1000000 execute... (5 Replies)
Discussion started by: msrahman
5 Replies

12. UNIX for Advanced & Expert Users

Search file in all directories.

Hi colleagues, I need to search one file in all dierctories, i have O.S. AIX 5.3, my file began with cc, the others caracters i unknow. Then i can to search one string in file in all dierctories. Thank you for advanced. (8 Replies)
Discussion started by: systemoper
8 Replies

13. Shell Programming and Scripting

Search between two search strings and print the value

Based on the forums i have tried with grep command but i am unable to get the required output. search this value /*------ If that is found then search for temp_vul and print and also search until /*------- and print new_vul Input file contains: ... (5 Replies)
Discussion started by: onesuri
5 Replies

14. UNIX for Beginners Questions & Answers

Search for the information at file

I'm having few question. i'm have a input file. Other information CONNECTIONS "BP-COLLECTOR" J6.4 "BP-TEST".4; +5VS C34.1 U21.1; DEV_I2C_SDA J6.6 R4.1 U18.1; DEVICES "BP-TEST" 1."BP-LED_ANODE" (8 Replies)
Discussion started by: kttan
8 Replies

15. UNIX for Beginners Questions & Answers

Search strings from a file in files in a directory recursively; then print the string with a status

Hi All, I hope somebody would be able to help me. I would need to search a string coming from a file, example file.txt: dog cat goat horse fish For every string, I would need to know if there are any files inside a directory(recursively) that contains the string regardless of case.... (9 Replies)
Discussion started by: kokoro
9 Replies