NAME
DBIx::QuickORM::Dialect::SQLite - SQLite dialect for DBIx::QuickORM.
DESCRIPTION
The SQLite-specific DBIx::QuickORM::Dialect. Introspects schema metadata from SQLite's pragma_* tables and sqlite_master, drives transactions and savepoints via the SQLite driver, and reports SQLite's feature set (RETURNING support, no async support).
SYNOPSIS
my $dialect = DBIx::QuickORM::Dialect::SQLite->new(dbh => $dbh, db_name => $name);
PUBLIC METHODS
- $driver = $dialect->dbi_driver
- $name = $dialect->dialect_name
- $bool = $dialect->supports_returning_update
- $bool = $dialect->supports_returning_insert
- $bool = $dialect->supports_returning_delete
- $bool = $dialect->async_supported
- $bool = $dialect->async_cancel_supported
-
Feature flags and constants describing the SQLite dialect. SQLite does not support async queries.
- $stype = $dialect->supports_type($type)
-
Returns SQLite's native storage type name for a supported logical type, or nothing. SQLite has no native JSON type; JSON-ish types fall back to
TEXTviasupports_type('text'). - $dialect->async_prepare_args
- $dialect->async_ready
- $dialect->async_result
- $dialect->async_cancel
-
SQLite does not support async queries; these
croak. - $version = $dialect->db_version
-
The version of the SQLite library itself (not the
DBD::SQLitemodule version). - $dialect->start_txn(%params)
- $dialect->commit_txn(%params)
- $dialect->rollback_txn(%params)
- $dialect->create_savepoint(%params)
- $dialect->commit_savepoint(%params)
- $dialect->rollback_savepoint(%params)
-
Transaction and savepoint control via the SQLite driver. Each accepts an optional
dbhparameter, defaulting to the dialect's own handle; savepoint methods take asavepointname. - $dsn = $dialect->dsn($db)
-
Builds a SQLite DSN string from a database config object.
PUBLIC METHODS
- $tables = $dialect->build_tables_from_db(%params)
-
Introspects all tables and views (including temp ones) and returns a hashref of name to schema-table object.
- ($pk, $unique, $links) = $dialect->build_table_keys_from_db($table, %params)
-
Introspects a table's primary key, unique keys, and foreign-key links.
- $bool = $dialect->table_has_autoinc($table)
-
True if the named table declares an
AUTOINCREMENTcolumn. - $columns = $dialect->build_columns_from_db($table, %params)
-
Introspects a table's columns and returns a hashref of column name to column object.
- $indexes = $dialect->build_indexes_from_db($table, %params)
-
Introspects a table's indexes and returns an arrayref of index specs.
PRIVATE METHODS
- @cols = $dialect->_primary_key($table)
-
Returns the primary-key column names for a table, ordered by key position.
- $ddl_or_undef = $dialect->_table_ddl($table)
-
The stored
CREATE TABLEstatement for the named table (permanent or temp), or undef when the table does not exist. - $sql = $dialect->_strip_sql_noise($sql)
-
Returns the SQL with string literals replaced by empty strings and comments removed, so keyword matching cannot false-positive on either.
- $col_or_undef = $dialect->_rowid_alias_column($table)
-
The name of the column that aliases SQLite's rowid, or undef if the table has none. The alias rule: a rowid table (no
WITHOUT ROWID) with a single-column primary key whose declared type is exactlyINTEGER(INT,BIGINT, etc. do not alias). Not handled: the obscurex INTEGER PRIMARY KEY DESCcolumn-definition form, which SQLite does not treat as an alias.
SOURCE
The source code repository for DBIx::QuickORM can be found at https://github.com/exodist/DBIx-QuickORM.
MAINTAINERS
AUTHORS
COPYRIGHT
Copyright Chad Granum <exodist7@gmail.com>.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.