SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG

 
 

perl-Mojo-SQLite rpm build for : OpenSuSE. For other distributions click perl-Mojo-SQLite.

Name : perl-Mojo-SQLite
Version : 3.000 Vendor : obs://build_opensuse_org/home:sbahling
Release : 2.2 Date : 2018-06-20 06:21:03
Group : Development/Libraries/Perl Source RPM : perl-Mojo-SQLite-3.000-2.2.src.rpm
Size : 0.10 MB
Packager : (none)
Summary : Tiny Mojolicious Wrapper for Sqlite
Description :
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);

RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/home:/sbahling:/Backports:/SLE-15/SLE_15/noarch

Content of RPM  Changelog  Provides Requires

Hmm ... It's impossible ;-) This RPM doesn't exist on any FTP server

Provides :
perl(Mojo::SQLite)
perl(Mojo::SQLite::Database)
perl(Mojo::SQLite::Migrations)
perl(Mojo::SQLite::PubSub)
perl(Mojo::SQLite::Results)
perl(Mojo::SQLite::Transaction)
perl-Mojo-SQLite

Requires :
perl(:MODULE_COMPAT_5.26.1)
perl(DBD::SQLite) >= 1.50
perl(DBI) >= 1.627
perl(Mojolicious) >= 7.32
perl(SQL::Abstract) >= 1.81
perl(URI) >= 1.69
perl(URI::db) >= 0.15
perl(URI::file) >= 4.21
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsXz) <= 5.2-1


Content of RPM :
/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
There is 15 files more in these RPM.

 
ICM