Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
devel:languages:perl:CPAN-D
perl-DBIx-Query
perl-DBIx-Query.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File perl-DBIx-Query.spec of Package perl-DBIx-Query
# # spec file for package perl-DBIx-Query # # Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %define cpan_name DBIx-Query Name: perl-DBIx-Query Version: 1.15 Release: 0 License: Artistic-2.0 Summary: Simplified abstracted chained DBI subclass URL: https://metacpan.org/release/%{cpan_name} Source0: https://cpan.metacpan.org/authors/id/G/GR/GRYPHON/%{cpan_name}-%{version}.tar.gz BuildArch: noarch BuildRequires: perl BuildRequires: perl-macros BuildRequires: perl(Clone) BuildRequires: perl(DBD::SQLite) BuildRequires: perl(DBI) >= 1.40 BuildRequires: perl(SQL::Abstract::Complete) BuildRequires: perl(SQL::Parser) BuildRequires: perl(Test2::V0) BuildRequires: perl(parent) Requires: perl(DBD::SQLite) Requires: perl(DBI) >= 1.40 Requires: perl(SQL::Abstract::Complete) Requires: perl(SQL::Parser) Requires: perl(parent) %{perl_requires} %description This module provides a simplified abstracted chained DBI subclass. It's sort of like jQuery for DBI, or sort of like DBIx::Class only without objects, or sort of like cookies without a glass of milk. With DBIx::Query, you can construct queries either with SQL or abstract Perl data structures described by SQL::Abstract::Complete. my $stuff = $dq->sql('SELECT stuff FROM things WHERE value = ?')->run(42)->all; my $things = $dq->get( 'things', ['stuff'], { 'value' = 42 } )->run->all; The overall point being that you can chain various parts of the query prepare, execute, and data retrieval process to dramatically reduce repeated code in most programs. my $c_value = $dq->sql('SELECT a FROM b WHERE c = ?')->run($c)->value; my $everything = $dq->get('things')->run->all({}); DBIx::Query is a pure subclass of DBI, so it can be used exactly like DBI. At any point, you can drop out of DBIx::Query-specific methods and use DBI methods. my $sth = $dq->get('things'); $sth->execute; my $stuff = $sth->fetchall_arrayref; Like DBI, there are multiple sub-classes each with a set of methods related to its level. In DBI, there is: * DBI (the parent class) * db (the object created from a connect call) * st (the statement handle) DBIx::Query adds the following additional: * rowset * row * cell %prep %autosetup -n %{cpan_name}-%{version} %build perl Makefile.PL INSTALLDIRS=vendor %make_build %check make test %install %perl_make_install %perl_process_packlist %perl_gen_filelist %files -f %{name}.files %doc Changes README %license LICENSE %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor