DBIx::C...::SQLite(3)
DBIx::C...::SQLite(3) π
okay so this is the User Contributed Perl Documentation page for DBIx::C...::SQLite(3), and bestie, it's giving classic DBIC storage-module realness. let's get into it π«Ά
β¨ NAME β¨
DBIx::Class::Storage::DBI::SQLite β Automatic primary key class for SQLite
π SYNOPSIS π
bestie, in your table classes you'd do this:
# In your table classes
use base 'DBIx::Class::Core';
__PACKAGE__->set_primary_key('id');
πΈ DESCRIPTION πΈ
This class implements autoincrements for SQLite. periodt.
𧨠Known Issues π§¨
π RT79576 π
NOTE β this section applies to you only if ALL of these are true:
- You are or were using
DBD::SQLitewith a version lesser than1.38_01 - You are or were using
DBIx::Classversions between0.08191and0.08209(inclusive) or between0.08240-TRIALand0.08242-TRIAL(also inclusive) - You use objects with overloaded stringification and are feeding them to DBIC CRUD methods directly
π An unfortunate chain of events led to DBIx::Class silently hitting the problem described in RT#79576 <https://rt.cpan.org/Public/Bug/Display.html?id=79576>.
In order to trigger the bug condition one needs to supply more than one bind value that is an object with overloaded stringification (numification is not relevant, only stringification is). When this is the case the internal DBIx::Class call to $sth->bind_param would be executed in a way that triggers the above-mentioned DBD::SQLite bug. As a result all the logs and tracers will contain the expected values, however SQLite will receive all these bind positions being set to the value of the last supplied stringifiable object.
π¨ Even if you upgradeDBIx::Class(which works around the bug starting from version0.08210) you may still have corrupted/incorrect data in your database.DBIx::Classwarned about this condition for several years, hoping to give anyone affected sufficient notice of the potential issues. The warning was removed in2015/v0.082820.
π οΈ METHODS π οΈ
π§ connect_call_use_foreign_keys π§
Used as:
on_connect_call => 'use_foreign_keys'
In connect_info to turn on foreign key (including cascading) support for recent versions of SQLite and DBD::SQLite.
Executes:
PRAGMA foreign_keys = ON
See <http://www.sqlite.org/foreignkeys.html> for more information.
π€ FURTHER QUESTIONS? π€
Check the list of additional DBIC resources. iykyk β¨
π COPYRIGHT AND LICENSE π
This module is free software copyright by the DBIx::Class (DBIC) authors. You can redistribute it and/or modify it under the same terms as the DBIx::Class library.
π and that's the page, bestie β source/version is perl v5.42.0, date is 2025-01-22, and the footer label is DBIx::C...::SQLite(3). periodt. π
π¦ where this page comes from
- opensuse-leap 16.0: perl-DBIx-Class 0.082844-bp160.1.10 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms