forked from pool/perl-SQL-Abstract
Accepting request 177566 from home:coolo:update-perl
- updated to 1.73 - Fix parsing of ORDER BY foo + ? - Stop filling in placeholders in `format-sql` since it does not support passing values for them anyway - Fix parsing of NOT EXISTS - Fix over-eager parenthesis unrolling - Fix deep recursion warnings while parsing obnoxiously long sql statements - Fix incorrect comparison of malformed lists - Fix incorrect reporting of mismatch-members in SQLA::Test - Migrate the -ident operator from DBIC into SQLA - Migrate the -value operator from DBIC into SQLA OBS-URL: https://build.opensuse.org/request/show/177566 OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-SQL-Abstract?expand=0&rev=8
This commit is contained in:
committed by
Git OBS Bridge
parent
ea5c93ca01
commit
4706e7316f
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:7902abc8c5f4c5f9bc9bd2ffd0a2d4c98c55b5a1bde80d8b0b3a94ff41f94b89
|
|
||||||
size 88235
|
|
3
SQL-Abstract-1.73.tar.gz
Normal file
3
SQL-Abstract-1.73.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:6b26a2ff1e25bc14c3396d456b8b38a8bc74e1d909a7ec2ad4de18a6b7bf3720
|
||||||
|
size 93037
|
@@ -1,3 +1,18 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jun 4 17:21:42 UTC 2013 - coolo@suse.com
|
||||||
|
|
||||||
|
- updated to 1.73
|
||||||
|
- Fix parsing of ORDER BY foo + ?
|
||||||
|
- Stop filling in placeholders in `format-sql` since it does not support
|
||||||
|
passing values for them anyway
|
||||||
|
- Fix parsing of NOT EXISTS
|
||||||
|
- Fix over-eager parenthesis unrolling
|
||||||
|
- Fix deep recursion warnings while parsing obnoxiously long sql statements
|
||||||
|
- Fix incorrect comparison of malformed lists
|
||||||
|
- Fix incorrect reporting of mismatch-members in SQLA::Test
|
||||||
|
- Migrate the -ident operator from DBIC into SQLA
|
||||||
|
- Migrate the -value operator from DBIC into SQLA
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Mar 31 08:30:28 UTC 2011 - coolo@novell.com
|
Thu Mar 31 08:30:28 UTC 2011 - coolo@novell.com
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package perl-SQL-Abstract
|
# spec file for package perl-SQL-Abstract
|
||||||
#
|
#
|
||||||
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@@ -17,31 +17,41 @@
|
|||||||
|
|
||||||
|
|
||||||
Name: perl-SQL-Abstract
|
Name: perl-SQL-Abstract
|
||||||
Version: 1.72
|
Version: 1.73
|
||||||
Release: 0
|
Release: 0
|
||||||
%define cpan_name SQL-Abstract
|
%define cpan_name SQL-Abstract
|
||||||
Summary: Generate SQL from Perl data structures
|
Summary: Generate SQL from Perl data structures
|
||||||
License: GPL-1.0+ or Artistic-1.0
|
License: Artistic-1.0 or GPL-1.0+
|
||||||
Group: Development/Libraries/Perl
|
Group: Development/Libraries/Perl
|
||||||
Url: http://search.cpan.org/dist/SQL-Abstract/
|
Url: http://search.cpan.org/dist/SQL-Abstract/
|
||||||
Source: http://www.cpan.org/authors/id/F/FR/FREW/SQL-Abstract-%{version}.tar.gz
|
Source: http://www.cpan.org/authors/id/F/FR/FREW/%{cpan_name}-%{version}.tar.gz
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
BuildRequires: perl
|
BuildRequires: perl
|
||||||
BuildRequires: perl-macros
|
BuildRequires: perl-macros
|
||||||
BuildRequires: perl(Class::Accessor::Grouped) >= 0.10002
|
BuildRequires: perl(Class::Accessor::Grouped) >= 0.10005
|
||||||
BuildRequires: perl(Getopt::Long::Descriptive) >= 0.086
|
BuildRequires: perl(Getopt::Long::Descriptive) >= 0.091
|
||||||
BuildRequires: perl(Hash::Merge) >= 0.12
|
BuildRequires: perl(Hash::Merge) >= 0.12
|
||||||
BuildRequires: perl(List::Util)
|
|
||||||
BuildRequires: perl(Scalar::Util)
|
|
||||||
BuildRequires: perl(Test::Deep) >= 0.106
|
|
||||||
BuildRequires: perl(Test::Exception)
|
BuildRequires: perl(Test::Exception)
|
||||||
|
BuildRequires: perl(Test::More) >= 0.92
|
||||||
BuildRequires: perl(Test::Warn)
|
BuildRequires: perl(Test::Warn)
|
||||||
Requires: perl(Class::Accessor::Grouped) >= 0.10002
|
#BuildRequires: perl(CPANPLUS::Backend)
|
||||||
Requires: perl(Getopt::Long::Descriptive) >= 0.086
|
#BuildRequires: perl(DBIx::Class::Storage::Debug::PrettyPrint)
|
||||||
|
#BuildRequires: perl(DBIx::Class::Storage::Statistics)
|
||||||
|
#BuildRequires: perl(inc::Module::Install) >= 1.06
|
||||||
|
#BuildRequires: perl(JSON)
|
||||||
|
#BuildRequires: perl(LWP::Simple)
|
||||||
|
#BuildRequires: perl(Module::AutoInstall)
|
||||||
|
#BuildRequires: perl(Module::Build)
|
||||||
|
#BuildRequires: perl(Module::Install::Base)
|
||||||
|
#BuildRequires: perl(Parse::CPAN::Meta)
|
||||||
|
#BuildRequires: perl(SQL::Abstract)
|
||||||
|
#BuildRequires: perl(SQL::Abstract::Test)
|
||||||
|
#BuildRequires: perl(SQL::Abstract::Tree)
|
||||||
|
#BuildRequires: perl(YAML::Tiny)
|
||||||
|
Requires: perl(Class::Accessor::Grouped) >= 0.10005
|
||||||
|
Requires: perl(Getopt::Long::Descriptive) >= 0.091
|
||||||
Requires: perl(Hash::Merge) >= 0.12
|
Requires: perl(Hash::Merge) >= 0.12
|
||||||
Requires: perl(List::Util)
|
|
||||||
Requires: perl(Scalar::Util)
|
|
||||||
%{perl_requires}
|
%{perl_requires}
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@@ -59,8 +69,37 @@ 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
|
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.
|
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);
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{cpan_name}-%{version}
|
%setup -q -n %{cpan_name}-%{version}
|
||||||
|
find . -type f -print0 | xargs -0 chmod 644
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%{__perl} Makefile.PL INSTALLDIRS=vendor
|
%{__perl} Makefile.PL INSTALLDIRS=vendor
|
||||||
@@ -75,7 +114,7 @@ your data changes, as this module figures it out.
|
|||||||
%perl_gen_filelist
|
%perl_gen_filelist
|
||||||
|
|
||||||
%files -f %{name}.files
|
%files -f %{name}.files
|
||||||
%defattr(644,root,root,755)
|
%defattr(-,root,root,755)
|
||||||
%doc Changes
|
%doc Changes examples
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Reference in New Issue
Block a user