NAME
DBIO::SQLite::Result - SQLite-specific Result component for DBIO
VERSION
version 0.900000
DESCRIPTION
DBIO::SQLite::Result is a DBIO Result component that adds SQLite-native metadata to a result class: custom indexes (including partial and expression indexes). It is the counterpart to DBIO::PostgreSQL::Result / DBIO::MySQL::Result and is read by DBIO::SQLite::DDL when generating install DDL.
Load it with:
package MyApp::DB::Result::User;
use base 'DBIO::Core';
__PACKAGE__->load_components('SQLite::Result');
__PACKAGE__->table('users');
__PACKAGE__->sqlite_index('idx_users_active' => {
columns => ['role'],
where => "role != 'suspended'", # partial index
});
__PACKAGE__->sqlite_index('idx_users_name_lower' => {
expression => 'lower(name)', # expression index
});
METHODS
sqlite_index
__PACKAGE__->sqlite_index('idx_users_tags' => {
columns => ['tags'],
});
__PACKAGE__->sqlite_index('idx_users_active' => {
columns => ['role'],
where => "role != 'suspended'",
});
Get or set the definition for a named SQLite index. The definition hashref accepts:
columns- ArrayRef of column namesunique- set to true for a UNIQUE indexwhere- partial index predicate (SQL expression string)expression- expression index expression (replacescolumns)
sqlite_indexes
my $all = $class->sqlite_indexes; # hashref of name => def
Returns a copy of all index definitions registered on this result class.
DBIO::SQLite::DDL - consumes
sqlite_indexeswhen generating DDLDBIO::PostgreSQL::Result - the PostgreSQL counterpart
AUTHOR
DBIO & DBIx::Class Authors
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.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 104:
Unknown directive: =seealso