| 1 | =head1 NAME | ||
| 2 | |||
| 3 | DBIx::SQLEngine::Driver::Trait::NoJoins - For databases without join ability | ||
| 4 | |||
| 5 | =head1 SYNOPSIS | ||
| 6 | |||
| 7 | # Classes can import this behavior if they can't join | ||
| 8 | use DBIx::SQLEngine::Driver::Trait::NoJoins ':all'; | ||
| 9 | |||
| 10 | =head1 DESCRIPTION | ||
| 11 | |||
| 12 | This package works with DBD drivers which lack the basic ability to join tables. | ||
| 13 | |||
| 14 | =head2 About Driver Traits | ||
| 15 | |||
| 16 | You do not need to use this package directly; it is used internally by those driver subclasses which need it. | ||
| 17 | |||
| 18 | For more information about Driver Traits, see L<DBIx::SQLEngine::Driver/"About Driver Traits">. | ||
| 19 | |||
| 20 | =cut | ||
| 21 | |||
| 22 | ######################################################################## | ||
| 23 | |||
| 24 | package DBIx::SQLEngine::Driver::Trait::NoJoins; | ||
| 25 | |||
| 26 | use strict; | ||
| 27 | use Carp; | ||
| 28 | use vars qw( @EXPORT_OK %EXPORT_TAGS ); | ||
| 29 | |||
| 30 | ######################################################################## | ||
| 31 | |||
| 32 | use Exporter; | ||
| 33 | sub import { goto &Exporter::import } | ||
| 34 | @EXPORT_OK = ( | ||
| 35 | qw( | ||
| 36 | sql_join | ||
| 37 | dbms_joins_unsupported | ||
| 38 | dbms_join_on_unsupported | ||
| 39 | dbms_outer_join_unsupported | ||
| 40 | ), | ||
| 41 | ); | ||
| 42 | %EXPORT_TAGS = ( all => \@EXPORT_OK ); | ||
| 43 | |||
| 44 | ######################################################################## | ||
| 45 | |||
| 46 | =head1 REFERENCE | ||
| 47 | |||
| 48 | The following methods are provided: | ||
| 49 | |||
| 50 | =head2 Select to Retrieve Data | ||
| 51 | |||
| 52 | =over 4 | ||
| 53 | |||
| 54 | =item sql_join() | ||
| 55 | |||
| 56 | Dies with an "Unsupported" message. | ||
| 57 | |||
| 58 | =back | ||
| 59 | |||
| 60 | =cut | ||
| 61 | |||
| 62 | sub sql_join { die "Unsupported" } | ||
| 63 | |||
| 64 | ######################################################################## | ||
| 65 | |||
| 66 | =head2 Database Capability Information | ||
| 67 | |||
| 68 | =over 4 | ||
| 69 | |||
| 70 | =item dbms_joins_unsupported | ||
| 71 | |||
| 72 | $sqldb->dbms_joins_unsupported () : 1 | ||
| 73 | |||
| 74 | Capability Limitation: This driver does not support joins. | ||
| 75 | |||
| 76 | =item dbms_join_on_unsupported | ||
| 77 | |||
| 78 | $sqldb->dbms_join_on_unsupported() : 1 | ||
| 79 | |||
| 80 | Capability Limitation: This driver does not support the "join ... on ..." syntax. | ||
| 81 | |||
| 82 | =item dbms_outer_join_unsupported | ||
| 83 | |||
| 84 | $sqldb->dbms_outer_join_unsupported() : 1 | ||
| 85 | |||
| 86 | Capability Limitation: This driver does not support any type of outer joins. | ||
| 87 | |||
| 88 | =back | ||
| 89 | |||
| 90 | =cut | ||
| 91 | |||
| 92 | sub dbms_joins_unsupported { 1 } | ||
| 93 | sub dbms_join_on_unsupported { 1 } | ||
| 94 | sub dbms_outer_join_unsupported { 1 } | ||
| 95 | |||
| 96 | ######################################################################## | ||
| 97 | |||
| 98 | =head1 SEE ALSO | ||
| 99 | |||
| 100 | See L<DBIx::SQLEngine> for the overall interface and developer documentation. | ||
| 101 | |||
| 102 | See L<DBIx::SQLEngine::Docs::ReadMe> for general information about | ||
| 103 | this distribution, including installation and license information. | ||
| 104 | |||
| 105 | See L<DBIx::Sequence> for another version of the sequence-table functionality, which greatly inspired this module. | ||
| 106 | |||
| 107 | =cut | ||
| 108 | |||
| 109 | ######################################################################## | ||
| 110 | |||
| 111 | 1; | ||
| 112 |