Index index by Group index by Distribution index by Vendor index by creation date index by Name Mirrors Help Search

perl-Mojo-SQLite-3.000-lp152.3.2 RPM for noarch

From OpenSuSE Leap 15.2 for noarch

Name: perl-Mojo-SQLite Distribution: openSUSE Leap 15.2
Version: 3.000 Vendor: openSUSE
Release: lp152.3.2 Build date: Fri Sep 20 19:58:34 2019
Group: Development/Libraries/Perl Build host: lamb18
Size: 104365 Source RPM: perl-Mojo-SQLite-3.000-lp152.3.2.src.rpm
Packager: https://bugs.opensuse.org
Url: http://search.cpan.org/dist/Mojo-SQLite/
Summary: Tiny Mojolicious Wrapper for Sqlite
Mojo::SQLite is a tiny wrapper around DBD::SQLite that makes at
https://www.sqlite.org/ a lot of fun to use with the at https://mojolico.us
real-time web framework. Use all at http://sqlite.org/lang.html SQLite has
to offer, generate CRUD queries from data structures, and manage your
database schema with migrations.

Database and statement handles are cached automatically, so they can be
reused transparently to increase performance. And you can handle connection
timeouts gracefully by holding on to them only for short amounts of time.

  use Mojolicious::Lite;
  use Mojo::SQLite;

  helper sqlite => sub { state $sql = Mojo::SQLite->new('sqlite:test.db') };

  get '/' => sub {
    my $c  = shift;
    my $db = $c->sqlite->db;
    $c->render(json => $db->query('select datetime("now","localtime") as now')->hash);
  };

  app->start;

In this example application, we create a 'sqlite' helper to store a
Mojo::SQLite object. Our action calls that helper and uses the method
Mojo::SQLite/"db" to dequeue a Mojo::SQLite::Database object from the
connection pool. Then we use the method Mojo::SQLite::Database/"query" to
execute an at http://www.postgresql.org/docs/current/static/sql.html
statement, which returns a Mojo::SQLite::Results object. And finally we
call the method Mojo::SQLite::Results/"hash" to retrieve the first row as a
hash reference.

All I/O and queries are performed synchronously. However, the "Write-Ahead
Log" journal is enabled for all connections, allowing multiple processes to
read and write concurrently to the same database file (but only one can
write at a time). You can prevent this mode from being enabled by passing
the option 'no_wal', but note that this is incompatible with SQLite
databases that have already had WAL mode enabled. See
http://sqlite.org/wal.html and DBD::SQLite/"journal_mode" for more
information.

  
  my $pid = fork || die $!;
  say $sql->db->query('select datetime("now","localtime") as time')->hash->{time};
  exit unless $pid;

All cached database handles will be reset automatically if a new process
has been forked, this allows multiple processes to share the same
Mojo::SQLite object safely.

Any database errors will throw an exception as 'RaiseError' is
automatically enabled, so use 'eval' or Try::Tiny to catch them. This makes
transactions with Mojo::SQLite::Database/"begin" easy.

While passing a file path of ':memory:' (or a custom "dsn" with
'mode=memory') will create a temporary database, in-memory databases cannot
be shared between connections, so subsequent calls to "db" may return
connections to completely different databases. For a temporary database
that can be shared between connections and processes, pass a file path of
':temp:' to store the database in a temporary directory (this is the
default), or consider constructing a temporary directory yourself with
File::Temp if you need to reuse the filename. A temporary directory allows
SQLite to create at https://www.sqlite.org/tempfiles.html safely.

  use File::Spec::Functions 'catfile';
  use File::Temp;
  use Mojo::SQLite;
  my $tempdir = File::Temp->newdir; # Deleted when object goes out of scope
  my $tempfile = catfile $tempdir, 'test.db';
  my $sql = Mojo::SQLite->new->from_filename($tempfile);

Provides

Requires

License

Artistic-2.0

Changelog

* Fri Jul 21 2017 coolo@suse.com
  - updated to 3.000
    see /usr/share/doc/packages/perl-Mojo-SQLite/Changes
    3.000     2017-07-20 01:16:50 EDT
    - Changed default for max_connections attribute to 1.
    - Added support for sharing the database connection cache between multiple
      Mojo::SQLite objects. (based on Mojo::Pg 4.0)
    - Added parent attribute to Mojo::SQLite.
    - Fixed database connection leak with automatic migrations.
    - Removed deprecated Mojo::SQLite::PubSub and associated methods and attributes.
      SQLite's serverless nature means it does not have the ability to support
      client notifications, so it is not possible to implement an efficient
      pubsub system as in for example PostgreSQL, Redis, or websockets.
* Fri Jun 02 2017 coolo@suse.com
  - updated to 2.002
    see /usr/share/doc/packages/perl-Mojo-SQLite/Changes
    2.002     2017-06-01 14:16:34 EDT
    - Add no_wal option to prevent enabling WAL mode on connection.
* Sun Feb 19 2017 coolo@suse.com
  - updated to 2.001
    see /usr/share/doc/packages/perl-Mojo-SQLite/Changes
    2.001     2017-02-18 15:36:16 EST
    - Set name_sep in default SQL::Abstract object to support proper quoting of
      table and column names.
* Sun Feb 12 2017 coolo@suse.com
  - updated to 2.000
    see /usr/share/doc/packages/perl-Mojo-SQLite/Changes
    2.000     2017-02-11 17:03:53 EST
    - Add support for generating queries with SQL::Abstract. (based on Mojo::Pg 3.0)
    - Add abstract attribute to Mojo::SQLite.
    - Add delete, insert, select, and update methods to Mojo::SQLite::Database.
* Wed Jan 18 2017 coolo@suse.com
  - updated to 1.004
    see /usr/share/doc/packages/perl-Mojo-SQLite/Changes
    1.004     2017-01-17 00:10:51 EST
    - Use Mojo::File from Mojolicious 7.15 instead of deprecated
      Mojo::Util slurp function. (#9)
* Mon Dec 12 2016 coolo@suse.com
  - updated to 1.003
    see /usr/share/doc/packages/perl-Mojo-SQLite/Changes
    1.003     2016-12-11 16:30:31 EST
    - Add links to alternatives for deprecated Mojo::SQLite::PubSub.
* Thu Dec 01 2016 coolo@suse.com
  - updated to 1.002
    see /usr/share/doc/packages/perl-Mojo-SQLite/Changes
    1.002     2016-11-30 11:17:56 EST
    - Improved contextual caller information in query error messages. (#6)
    - Fix memory leak when reusing the same database handle many times. (#7)
* Wed Nov 16 2016 coolo@suse.com
  - updated to 1.001
    see /usr/share/doc/packages/perl-Mojo-SQLite/Changes
    1.001     2016-11-15 02:32:27 EST
    - Deprecate Mojo::SQLite::PubSub and associated methods and attributes.
      SQLite's serverless nature means it does not have the ability to support
      client notifications, so it is not possible to implement an efficient
      pubsub system as in for example PostgreSQL, Redis, or websockets.
* Mon Nov 07 2016 sriedel@suse.de
  - initial version (1.000)

Files

/usr/lib/perl5/vendor_perl/5.26.1/Mojo
/usr/lib/perl5/vendor_perl/5.26.1/Mojo/SQLite
/usr/lib/perl5/vendor_perl/5.26.1/Mojo/SQLite.pm
/usr/lib/perl5/vendor_perl/5.26.1/Mojo/SQLite/Database.pm
/usr/lib/perl5/vendor_perl/5.26.1/Mojo/SQLite/Migrations.pm
/usr/lib/perl5/vendor_perl/5.26.1/Mojo/SQLite/PubSub.pm
/usr/lib/perl5/vendor_perl/5.26.1/Mojo/SQLite/Results.pm
/usr/lib/perl5/vendor_perl/5.26.1/Mojo/SQLite/Transaction.pm
/usr/share/doc/packages/perl-Mojo-SQLite
/usr/share/doc/packages/perl-Mojo-SQLite/CONTRIBUTING.md
/usr/share/doc/packages/perl-Mojo-SQLite/Changes
/usr/share/doc/packages/perl-Mojo-SQLite/README
/usr/share/doc/packages/perl-Mojo-SQLite/examples
/usr/share/doc/packages/perl-Mojo-SQLite/examples/blog
/usr/share/doc/packages/perl-Mojo-SQLite/examples/blog/blog.conf
/usr/share/doc/packages/perl-Mojo-SQLite/examples/blog/lib
/usr/share/doc/packages/perl-Mojo-SQLite/examples/blog/lib/Blog
/usr/share/doc/packages/perl-Mojo-SQLite/examples/blog/lib/Blog.pm
/usr/share/doc/packages/perl-Mojo-SQLite/examples/blog/lib/Blog/Controller
/usr/share/doc/packages/perl-Mojo-SQLite/examples/blog/lib/Blog/Controller/Posts.pm
/usr/share/doc/packages/perl-Mojo-SQLite/examples/blog/lib/Blog/Model
/usr/share/doc/packages/perl-Mojo-SQLite/examples/blog/lib/Blog/Model/Posts.pm
/usr/share/doc/packages/perl-Mojo-SQLite/examples/blog/migrations
/usr/share/doc/packages/perl-Mojo-SQLite/examples/blog/migrations/blog.sql
/usr/share/doc/packages/perl-Mojo-SQLite/examples/blog/script
/usr/share/doc/packages/perl-Mojo-SQLite/examples/blog/script/blog
/usr/share/doc/packages/perl-Mojo-SQLite/examples/blog/t
/usr/share/doc/packages/perl-Mojo-SQLite/examples/blog/t/blog.t
/usr/share/doc/packages/perl-Mojo-SQLite/examples/blog/templates
/usr/share/doc/packages/perl-Mojo-SQLite/examples/blog/templates/layouts
/usr/share/doc/packages/perl-Mojo-SQLite/examples/blog/templates/layouts/blog.html.ep
/usr/share/doc/packages/perl-Mojo-SQLite/examples/blog/templates/posts
/usr/share/doc/packages/perl-Mojo-SQLite/examples/blog/templates/posts/_form.html.ep
/usr/share/doc/packages/perl-Mojo-SQLite/examples/blog/templates/posts/create.html.ep
/usr/share/doc/packages/perl-Mojo-SQLite/examples/blog/templates/posts/edit.html.ep
/usr/share/doc/packages/perl-Mojo-SQLite/examples/blog/templates/posts/index.html.ep
/usr/share/doc/packages/perl-Mojo-SQLite/examples/blog/templates/posts/show.html.ep
/usr/share/licenses/perl-Mojo-SQLite
/usr/share/licenses/perl-Mojo-SQLite/LICENSE
/usr/share/man/man3/Mojo::SQLite.3pm.gz
/usr/share/man/man3/Mojo::SQLite::Database.3pm.gz
/usr/share/man/man3/Mojo::SQLite::Migrations.3pm.gz
/usr/share/man/man3/Mojo::SQLite::PubSub.3pm.gz
/usr/share/man/man3/Mojo::SQLite::Results.3pm.gz
/usr/share/man/man3/Mojo::SQLite::Transaction.3pm.gz


Generated by rpm2html 1.8.1

Fabrice Bellet, Mon May 9 12:54:53 2022