| 1 | package DBIx::QuickORM::Dialect::MariaDB; | ||
| 2 | 3 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | 3 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | |||
| 5 | 3 | our $VERSION = '0.000031'; | |
| 6 | |||
| 7 | 3 | ▶ | use parent 'DBIx::QuickORM::Dialect::MySQL'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | |||
| 9 | =pod | ||
| 10 | |||
| 11 | =encoding UTF-8 | ||
| 12 | |||
| 13 | =head1 NAME | ||
| 14 | |||
| 15 | DBIx::QuickORM::Dialect::MariaDB - MariaDB dialect. | ||
| 16 | |||
| 17 | =head1 DESCRIPTION | ||
| 18 | |||
| 19 | MariaDB through L<DBD::MariaDB>. It inherits everything from | ||
| 20 | L<DBIx::QuickORM::Dialect::MySQL> except C<RETURNING> on C<INSERT> and | ||
| 21 | C<DELETE>, which MariaDB has, and its code for a failed C<CHECK>. | ||
| 22 | |||
| 23 | =head1 SYNOPSIS | ||
| 24 | |||
| 25 | my $dialect = DBIx::QuickORM::Dialect->for_dbh($dbh); # this class for a MariaDB server | ||
| 26 | |||
| 27 | =head1 PUBLIC METHODS | ||
| 28 | |||
| 29 | =over 4 | ||
| 30 | |||
| 31 | =item $bool = $dialect->supports_returning_insert | ||
| 32 | |||
| 33 | =item $bool = $dialect->supports_returning_delete | ||
| 34 | |||
| 35 | True. C<UPDATE> has no C<RETURNING> (inherited, false). | ||
| 36 | |||
| 37 | =item \%kinds = $dialect->native_error_kinds | ||
| 38 | |||
| 39 | MySQL's codes, with MariaDB's code for a failed C<CHECK> (4025) in place of | ||
| 40 | MySQL's. | ||
| 41 | |||
| 42 | =back | ||
| 43 | |||
| 44 | =cut | ||
| 45 | |||
| 46 | 1 | ▶ | sub supports_returning_insert { 1 } |
|
Subroutine
supports_returning_insert: called CC=1 SCAR=0.0
Pod
documented
| |||
| 47 | 1 | ▶ | sub supports_returning_delete { 1 } |
|
Subroutine
supports_returning_delete: called CC=1 SCAR=0.0
Pod
documented
| |||
| 48 | |||
| 49 | 3 | my %NATIVE_KIND = %{DBIx::QuickORM::Dialect::MySQL->native_error_kinds}; | |
| 50 | 3 | delete $NATIVE_KIND{3819}; | |
| 51 | 3 | $NATIVE_KIND{4025} = 'check_violation'; | |
| 52 | |||
| 53 | 3 | ▶ | sub native_error_kinds { \%NATIVE_KIND } |
|
Subroutine
native_error_kinds: called CC=1 SCAR=0.0
Pod
documented
| |||
| 54 | |||
| 55 | 3 | 1; | |
| 56 | |||
| 57 | __END__ | ||