Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 956 Categories, Downloaded 50.260.220 Times

SQL::Interpolate 0.33

  Date Added: May 27, 2010  |  Visits: 1.040

SQL::Interpolate

Report Broken Link
Printer Friendly Version


Product Homepage
Download (88 downloads)



SQL::Interpolate is a Perl module to interpolate Perl variables into SQL statements. SYNOPSIS use SQL::Interpolate qw(:all); # Some sample data to interpolate: my $s = blue; my @v = (5, 6); # Variable references are transformed into bind parameters. # The most basic usage involves scalarrefs (as well as arrayrefs # preceeded by "IN"). my ($sql, @bind) = sql_interp SELECT * FROM table WHERE x = , $s, AND y IN, @v; # RESULT: # $sql = SELECT * FROM mytable WHERE x = ? AND y IN (?, ?) # @bind = ($s, @v); # In certain contexts, an arrayref or hashref acts as a single tuple: my ($sql, @bind) = sql_interp INSERT INTO table, {x => $s, y => 1}; # RESULT: # $sql = INSERT INTO mytable (x, y) VALUES(?, ?); # @bind = ($s, 1); my ($sql, @bind) = sql_interp UPDATE table SET, {x => $s, y => 1}, WHERE y <> , 2; # RESULT: # $sql = UPDATE mytable SET x = ?, y = ? WHERE y <> ?; # @bind = ($s, 1, 2); # In general, a hashref provides a shortcut for specifying # a logical-AND construction: my ($sql, @bind) = sql_interp SELECT * FROM table WHERE, {x => $s, y => @v}; # RESULT: # $sql = SELECT * FROM mytable WHERE (x = ? AND y IN (?, ?)); # @bind = ($s, @v); # In general, an arrayref acts as a result set or reference to # a temporary table: my ($sql, @bind) = sql_interp [[1, 2], [4, 5]], UNION, [{x => 2, y => 3}, {x => 5, y => 6}; # RESULT: # $sql = (SELECT ?, ? UNION ALL SELECT ?, ?) UNION # (SELECT ? AS x, ? AS y UNION ALL SELECT ?, ?); # @bind = (1,2,4,5, 2,3,5,6); my ($sql, @bind) = sql_interp SELECT * FROM, [[1, 2], [4, 5]] # RESULT: # $sql = SELECT * FROM (SELECT ?, ? UNION ALL SELECT ?, ?) AS tbl0; # @bind = (1,2,4,5); # Each result above is suitable for passing to DBI: my $res = $dbh->selectall_arrayref($sql, undef, @bind); # Besides these simple techniques shown, SQL-Interpolate includes # various optional modules to further integrate SQL::Interpolate with # DBI and streamline the syntax with source filtering and macros (see # the L section): use DBIx::Interpolate FILTER => 1; ... my $rows = $dbx->selectall_arrayref(sql[ SELECT thid, date, title, subject FROM threads WHERE date > $x AND subject IN @subjects ]);.

Requirements: No special requirements
Platforms: Linux
Keyword: Bind From Libraries Perl Perl Module Result Select Sql Sqlinterpolate Union Where
Users rating: 0/10

License: Freeware Size: 57.34 KB
USER REVIEWS
More Reviews or Write Review


SQL::INTERPOLATE RELATED
Libraries  -  Alien Perl module 0.91
Alien Perl module package contains external libraries wrapped up for your viewing pleasure! SYNOPSIS perldoc Alien; Alien is a package that exists just to hold together an idea, the idea of Alien:: packages, so there is no code here, just...
10.24 KB  
Libraries  -  OpenGeoDB Perl module 0.4
OpenGeDB Perl module is a module to access the OpenGeoDB database and calculate all ZIP codes in a certain radius..
3.07 KB  
Network & Internet  -  MyCMS perl module 1.0
MyCMS perl module provides the MN::CMS Perl module used by the MyCMS. MyCMS perl module contains Perl object classes to manage the data of MyCMS (such as articles, links, and images). MN::CMS is a perl module that allows you to manage an...
16.38 KB  
Libraries  -  DBIx::HTML::ClientDB 1.05
DBIx::HTML::ClientDB is a Perl module to convert sql into a client-side db with keyed access. Synopsis use DBIx::HTML::ClientDB; my($object) = DBIx::HTML::ClientDB -> new ( dbh => $dbh, row_headings => Unit code,Unit code,Campus name,Unit...
11.26 KB  
Libraries  -  Algorithm::Pair::Best 1.010
Algorithm::Pair::Best is a Perl module to select pairings (designed for Go tournaments, but can be used for anything, really). SYNOPSIS use Algorithm::Pair::Best; my $pair = Algorithm::Pair::Best->new( ? options ? ); $pair->add( item, ?...
10.24 KB  
Libraries  -  SQL::Preproc 0.10
SQL::Preproc is a Perl module to embed SQL in your Perl (ala SQL preprocessors). SYNOPSIS use SQL::Preproc subclass => Chart, emit => 1, keepsql => 1, syntax => [ Teradata ], pponly => 1, relax => 1, alias => 1, debug => 1; use DBI;...
52.22 KB  
Utilities  -  cpan2tgz 0.6.2
cpan2tgz is a utility to create Slackware packages from CPAN Perl module distributions, inspired by Erick Calders cpan2rpm.. GNOME SlackBuild (GSB) - a GNOME distribution for Slackware Linux
15.36 KB  
Libraries  -  Weather::Bug 0.01
Weather::Bug is a Perl module that can get realtime weather where available. SYNOPSIS use Weather::Bug; my $w = get_live_weather( KCMI ); print "It is $w->{temp} degrees in $w->{location}n"; Weather::Bug uses data from aws.coms live Java...
3.07 KB  
Libraries  -  Class::DBI::Query 3.0.15
Class::DBI::Query is a Perl module with deprecated SQL manager for Class::DBI. SYNOPSIS my $sth = Class::DBI::Query ->new({ owner => $class, sqlname => $type, essential => @columns, where_columns => @where_cols, }) ->run($val); This...
102.4 KB  
Libraries  -  SQL::Generator 0.02
SQL::Generator is a Perl module to generate SQL-statements with oo-perl. SYNOPSIS use SQL::Generator; With this module you can easily (and very flexible) generate/construct sql-statements. As a rookie, you are used to write a lot of...
13.31 KB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  Math::GMPf 0.29
Math::GMPf - perl interface to the GMP library's floating point (mpf) functions.
30.72 KB  
Programming  -  Net::Wire10 1.08
Net::Wire10 is a Pure Perl connector that talks to Sphinx, MySQL and Drizzle servers. Net::Wire10 implements the low-level network protocol, alias the MySQL wire protocol version 10, necessary for talking to one of the aforementioned...
30.72 KB  
Programming  -  logilab-common 0.56.2
a bunch of modules providing low level functionnalities shared among some python projects devel Please note that some of the modules have some extra dependencies. For instance, logilab.common.db will require a db-api 2.0 compliant...
174.08 KB  
Programming  -  OpenSSL for linux 1.0.0a
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a...
3.83 MB  
Libraries  -  wolfSSL 4.0.0
The wolfSSL embedded SSL/TLS library is a lightweight SSL library written in ANSI standard C and targeted for embedded and RTOS environments - primarily because of its small size, speed, and feature set. It is commonly used in standard operating...
3.88 MB  
Libraries  -  EuGTK 4.8.9
Makes it easy to develop good- looking, fast, cross-platform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straight-forward syntax. EuGTK allows programming in a clean, object-oriented...
10.68 MB  
Libraries  -  Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable.
5.35 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cpp-alike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also...
10.24 KB