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

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

Serving Software Downloads in 976 Categories, Downloaded 30.072.185 Times

SQL::Interpolate 0.33

  Date Added: May 27, 2010  |  Visits: 788

SQL::Interpolate

Report Broken Link
Printer Friendly Version


Product Homepage
Download (72 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
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  -  perlrpcgen 0.71
perlrpcgen is a Perl module that can generate Perl interfaces from ONC RPC interface definitions. SYNOPSIS perlrpcgen [--makefile] [--all] [--client] [--server] [--data] [--constants] [--module module] [--typemap typemap] [--fork] [--perl...
37.89 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  -  Class::AbstractLogic 0.01_01
Class::AbstractLogic is a Perl module to handle Logic Abstractions. SYNOPSIS # the logic class definition package My::Logic::Foo; use Class::AbstractLogic-base; # a logic action action add, needs [qw(a b)], verify { a => sub { /^d+$/ },...
16.38 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  
Libraries  -  Wx::Perl::Packager 0.07
Wx::Perl::Packager provides a module to assist packaging Wx based applications with PAR, ActiveState PerlApp / PDK and Perl A module to assist packaging Wx based applications with PAR, ActiveState PerlApp / PDK and Perl2Exe. All that is needed...
12.29 KB  
Libraries  -  Tuxedo 2.08
Tuxedo is a Perl extension module for Tuxedo. This module provides the following functionality... C style interface The Tuxedo perl module gives you access to almost all of the tuxedo 8.1 apis from perl. In most cases you can take the C API...
33.79 KB  
Libraries  -  Blatte 0.9.4
Blatte is a Perl module with text macro/markup/template language. SYNOPSIS use Blatte; use Blatte::Builtins; my $perl = &Blatte::Parse(...some Blatte program ...); if (defined($perl)) { my $result = eval $perl; if (defined($result)) {...
31.74 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  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  FLEX-db Digital Asset Manager 3.0.9
FLEX-db - an enterprise Digital Asset Manager (DAM). It ingests and links metadata with files, creates thumbnails, and processes files using business rules. FLEX-db has a JSP client, Java app server for file input and output and an EJB metadata...
21.57 MB  
Programming  -  Libicom 0.9.0
The libicom library is a character based dynamicly linked library for Linux. It is used to remotely control the Icom IC-R8500 wide band receiver via an RS232 link. All call and return parameters to the control functions are character string based....
20.48 KB  
Programming  -  dotdesktop 0.3
Dotdesktop library provides ability to parse desktop entry file and access the information in a convenient way. Desktop entry file format is defined by freedesktop.org, it is used to describe information about an application such as the name and...
327.68 KB  
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  -  libyasl 0.2
Libyasl is a C++ class library to easily realize TCP/UDP/Multicast clientsand servers in IPv4 and IPv6 environments under GNU/Linux systems.
143.36 KB  
Libraries  -  wolfSSL 3.12.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...
2.73 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