9 More Discussions You Might Find Interesting
1. Red Hat
I want the pdfs of course official red hat Rhce.
Thanks. (1 Reply)
Discussion started by: Ultralord
1 Replies
2. Red Hat
Hi,
Can any one provide me the details of RHCE certification like Course details, exam pattern, topics to study. I am planning to take up exam next month so i want to prepare for it.
Thanks (1 Reply)
Discussion started by: chetansingh23
1 Replies
3. Red Hat
I'd like to get RHCE certification but I can't find the books which get me for doing such , could someone guide me where can i find the books ?:wall: (4 Replies)
Discussion started by: arm
4 Replies
4. Red Hat
Hi ,
Kindly I wonder whether have any idea about the difference between RedHat & Centos operating systems ? I totally know that Centos is a derivative of Redhat but I'm talking about the similarity in terms of administration ( are the commands same?) for instance If someone had installed Centos... (2 Replies)
Discussion started by: arm
2 Replies
5. Red Hat
Hi All,
I am planing to take RHCE exam in the month of March 2012. Could anyone provide me with the latest dumps and pattern which can help me in clearing the certification exam.
Thanks (1 Reply)
Discussion started by: chetansingh23
1 Replies
6. Red Hat
guys I am preparing for rhce 6.Is there anyone rhce here who can give me tips to prepare for rhce.which books should i use (1 Reply)
Discussion started by: shamapraveen
1 Replies
7. Linux
Does anyone here who is an RHCE already? Do you have tutorials for this? (0 Replies)
Discussion started by: invinzin21
0 Replies
8. UNIX for Dummies Questions & Answers
Hi All,
Does anyone have RHCE Exam Sample or Practice Papers ??
I am planning to give it asap.
Pls help.
Thanks n Regards,
Vikas (1 Reply)
Discussion started by: vikas027
1 Replies
9. Solaris
dear solaris group,
whitch are the best book for study admin 1 + 2 on solaris 9
to prepare for the exam of admin 1 & 2
best regards
Maurizio (2 Replies)
Discussion started by: mauric
2 Replies
LEARN ABOUT DEBIAN
data::phrasebook::sql
Data::Phrasebook::SQL(3pm) User Contributed Perl Documentation Data::Phrasebook::SQL(3pm)
NAME
Data::Phrasebook::SQL - The SQL/DBI Phrasebook Model.
SYNOPSIS
use Data::Phrasebook;
use DBI;
my $dbh = DBI->connect(...);
my $book = Data::Phrasebook->new(
class => 'SQL',
dbh => $dbh,
file => 'queries.txt',
);
my $q = $book->query( 'find_author', {
author => "Lance Parkin"
});
while ( my $row = $q->fetchrow_hashref ) {
print "He wrote $row->{title}
";
}
$q->finish;
queries.txt:
find_author=select title,author from books where author = :author
DESCRIPTION
In order to make use of features like placeholders in DBI in conjunction with phrasebooks, it's helpful to have a phrasebook be somewhat
more aware of how DBI operates. Thus, you get "Data::Phrasebook::SQL".
"Data::Phrasebook::SQL" has knowledge of how DBI works and creates and executes your queries appropriately.
CONSTRUCTOR
new
Not to be accessed directly, but via the parent Data::Phrasebook, by specifying the class as SQL.
Additional arguments to those described in Data::Phrasebook::Generic are:
o "dbh" - a DBI database handle.
METHODS
dbh
Set, or get, the current DBI handle.
query
Constructs a Data::Phrasebook::SQL::Query object from a template. Takes at least one argument, this being the identifier for the query. The
identifier is used as a key into the phrasebook "file". A second argument can be provided, which is an optional hashref of key to value
mappings.
If phrasebook has a YAML source looking much like the following:
---
find_author:
sql: select class,title,author from books where author = :author
You could write:
my $q = $book->query( 'find_author' );
OR
my $q = $book->query( 'find_author', {
author => 'Lance Parkin'
} );
OR
my $author = 'Lance Parkin';
my $q = $book->query( 'find_author', {
author => $author,
} );
# sql = select class,title,author from books where author = ?
# args = 'Lance Parkin'
In the above examples, the parameters are bound to the SQL using the bind parameters functionality. This is more efficient in most cases
where the same SQL is reused with different values for fields.
However, not all SQL statements just need to bind parameters, some may require the ability to replace parameters, such as a field list.
---
find_author:
sql: select :fields from books where author = :author
my $q = $book->query( 'find_author',
replace => { fields => 'class,title,author' },
bind => { author => 'Lance Parkin' }
);
# sql = select class,title,author from books where author = ?
# args = 'Lance Parkin'
In all instances, if the SQL template requested does not exist or has no definition, then an error will be thrown.
Consult Data::Phrasebook::SQL::Query for what you can then do with your returned object.
For reference: the bind hashref argument, if it is given, is given to the query object's "order_args" and then "args" methods.
SEE ALSO
Data::Phrasebook, Data::Phrasebook::Generic, Data::Phrasebook::SQL::Query.
SUPPORT
Please see the README file.
AUTHOR
Original author: Iain Campbell Truskett (16.07.1979 - 29.12.2003)
Maintainer: Barbie <barbie@cpan.org> since January 2004.
for Miss Barbell Productions <http://www.missbarbell.co.uk>.
COPYRIGHT AND LICENSE
Copyright (C) 2003 Iain Truskett.
Copyright (C) 2004-2010 Barbie for Miss Barbell Productions.
This module is free software; you can redistribute it and/or
modify it under the Artistic Licence v2.
perl v5.10.1 2010-08-31 Data::Phrasebook::SQL(3pm)