|
|
Sybase::Simple - A simplified API for Sybase::CTlib
This is a simplified API module that sits on top of the Sybase::CTlib
module, and it is derived from the SybTools module that I wrote to
go with the second article for the ISUG Technical Journal.
For example, you might have a query that you know returns a single scalar
element:
my $data = $dbh->Scalar("select getdate()");
Neat, uh?
You can use similar calls to fetch a single row, array of rows, or execute
SQL that doesn't return any data (updates/inserts).
For large queries you can create an iterator so that you can still
process the rows one by one:
my $iter = $dbh->HashIter("select ... from large_table");
while(my $row = $iter->next()) {
... process the data in the row here ...
}
As Sybase::Simple "inherits" from Sybase::CTlib, you can still call all
the methods in Sybase::CTlib if you want to.
|
|