Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37735903
en ru br
ALT Linux repositórios
S:1.91-alt2

Group :: Desenvolvimento/Perl
RPM: perl-SQL-Abstract-Classic

 Principal   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

A versão atual: 1.91-alt2
Data da compilação: 25 junho 2020, 18:36 ( 201.2 weeks ago )
Tamanho:: 83.19 Kb

Home page:   http://search.cpan.org/dist/SQL-Abstract-Classi…

Licença: perl
Sumário: Generate SQL from Perl data structures
Descrição:

This module was inspired by the excellent the DBIx::Abstract manpage.
However, in using that module I found that what I really wanted
to do was generate SQL, but still retain complete control over my
statement handles and use the DBI interface. So, I set out to
create an abstract SQL generation module.

While based on the concepts used by the DBIx::Abstract manpage, there are
several important differences, especially when it comes to WHERE
clauses. I have modified the concepts used to make the SQL easier
to generate from Perl data structures and, IMO, more intuitive.
The underlying idea is for this module to do what you mean, based
on the data structures you provide it. The big advantage is that
you don't have to modify your code every time your data changes,
as this module figures it out.

To begin with, an SQL INSERT is as easy as just specifying a hash
of `key=value' pairs:

   my %data = (
       name => 'Jimbo Bobson',
       phone => '123-456-7890',
       address => '42 Sister Lane',
       city => 'St. Louis',
       state => 'Louisiana',
   );

The SQL can then be generated with this:

   my($stmt, @bind) = $sql->insert('people', \%data);

Which would give you something like this:

   $stmt = "INSERT INTO people
                   (address, city, name, phone, state)
                   VALUES (?, ?, ?, ?, ?)";
   @bind = ('42 Sister Lane', 'St. Louis', 'Jimbo Bobson',
            '123-456-7890', 'Louisiana');

These are then used directly in your DBI code:

   my $sth = $dbh->prepare($stmt);
   $sth->execute(@bind);

Mantenedor currente: Igor Vlasenko

Lista dos contribuidores

Lista dos rpms provida por esta srpm:

  • perl-SQL-Abstract-Classic
ACL:
     
    projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
    mantenedor atual: Michael Shigorin
    mantenedor da tradução: Fernando Martini aka fmartini © 2009