DBIO-SQLite
view release on metacpan or search on metacpan
lib/DBIO/SQLite.pm view on Meta::CPAN
=head2 Connecting
my $schema = MyApp::Schema->connect('dbi:SQLite:db/app.db');
$schema->deploy;
my $artist = $schema->resultset('Artist')->create({ name => 'Sonic Youth' });
my @cds = $artist->cds->all;
The classic C<use base> form is still supported:
package MyApp::Schema;
use base 'DBIO::Schema';
__PACKAGE__->load_components('SQLite');
=head1 DESCRIPTION
L<DBIO::SQLite> is the SQLite driver component for DBIO.
When this component is loaded into a schema class, C<connection()> sets
L<DBIO::Schema/storage_type> to C<+DBIO::SQLite::Storage>, which enables
SQLite-specific storage behavior automatically.
=head1 METHODS
=head2 connection
Overrides L<DBIO/connection> to force C<+DBIO::SQLite::Storage> as
C<storage_type>.
=head1 MIGRATION NOTES
SQLite storage and SQLMaker classes were split out of the historical
DBIx::Class monolithic distribution:
=over 4
=item *
Old: C<DBIx::Class::Storage::DBI::SQLite>
=item *
New: C<DBIO::SQLite::Storage>
=item *
Old: C<DBIx::Class::SQLMaker::SQLite>
=item *
New: C<DBIO::SQLite::SQLMaker>
=back
If C<DBIO-SQLite> is installed, core L<DBIO::Storage::DBI> can autodetect
SQLite DSNs and load the new storage class via the driver registry.
=head1 TESTING
SQLite tests in this distribution use in-memory databases and do not require
database credentials.
Offline SQLMaker tests can use L<DBIO::SQLite::Test> or L<DBIO::Test> with:
storage_type => 'DBIO::SQLite::Storage'
Shared tests can also exercise the replicated path with:
replicated => 1,
storage_type => 'DBIO::SQLite::Storage'
=head1 AUTHOR
DBIO & DBIx::Class Authors
=head1 COPYRIGHT AND LICENSE
Copyright (C) 2026 DBIO Authors
Portions Copyright (C) 2005-2025 DBIx::Class Authors
Based on DBIx::Class, heavily modified.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut
( run in 1.610 second using v1.01-cache-2.11-cpan-f4a522933cf )