| 1 | package DBIO::Firebird::SQLMaker; | ||
| 2 | # ABSTRACT: Firebird-specific SQL generation for DBIO | ||
| 3 | |||
| 4 | 2 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 2 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | 2 | ▶ | use base qw( DBIO::SQLMaker ); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | |||
| 9 | |||
| 10 | |||
| 11 | 2 | ▶ | sub apply_limit { |
|
Subroutine
apply_limit: called CC=1 SCAR=0.0
Pod
documented
| |||
| 12 | 2 | my ($self, $sql, $rs_attrs, $rows, $offset) = @_; | |
| 13 | 2 | return $self->_FirstSkip($sql, $rs_attrs, $rows, $offset); | |
| 14 | } | ||
| 15 | |||
| 16 | 2 | 1; | |
| 17 | |||
| 18 | __END__ | ||
| 19 | |||
| 20 | =pod | ||
| 21 | |||
| 22 | =encoding UTF-8 | ||
| 23 | |||
| 24 | =head1 NAME | ||
| 25 | |||
| 26 | DBIO::Firebird::SQLMaker - Firebird-specific SQL generation for DBIO | ||
| 27 | |||
| 28 | =head1 VERSION | ||
| 29 | |||
| 30 | version 0.900001 | ||
| 31 | |||
| 32 | =head1 DESCRIPTION | ||
| 33 | |||
| 34 | L<DBIO::SQLMaker> subclass for the Firebird RDBMS. Firebird has no | ||
| 35 | C<LIMIT>/C<OFFSET> keyword; it slices result sets with C<FIRST n SKIP m> | ||
| 36 | immediately after C<SELECT>. This class implements that via L</apply_limit>. | ||
| 37 | |||
| 38 | Set as the C<sql_maker_class> by L<DBIO::Firebird::Storage::Common>, so both | ||
| 39 | the L<DBD::Firebird|DBIO::Firebird::Storage> and | ||
| 40 | L<DBD::InterBase|DBIO::Firebird::Storage::InterBase> variants use it. Not | ||
| 41 | normally instantiated directly. | ||
| 42 | |||
| 43 | =head1 METHODS | ||
| 44 | |||
| 45 | =head2 apply_limit | ||
| 46 | |||
| 47 | my $sql = $sqlmaker->apply_limit($sql, $rs_attrs, $rows, $offset); | ||
| 48 | |||
| 49 | Emits C<SELECT FIRST ? SKIP ? ...> instead of the default | ||
| 50 | C<... LIMIT ? OFFSET ?>, which Firebird does not understand. Replaces the | ||
| 51 | DBIx::Class C<sql_limit_dialect = 'FirstSkip'> string dispatch. | ||
| 52 | |||
| 53 | =head1 SEE ALSO | ||
| 54 | |||
| 55 | =over | ||
| 56 | |||
| 57 | =item * L<DBIO::SQLMaker> - Base SQL generation class | ||
| 58 | |||
| 59 | =item * L<DBIO::Firebird::Storage::Common> - Storage base that uses this SQL maker | ||
| 60 | |||
| 61 | =item * L<DBIO::Firebird> - Top-level Firebird schema component | ||
| 62 | |||
| 63 | =back | ||
| 64 | |||
| 65 | =head1 AUTHOR | ||
| 66 | |||
| 67 | DBIO & DBIx::Class Authors | ||
| 68 | |||
| 69 | =head1 COPYRIGHT AND LICENSE | ||
| 70 | |||
| 71 | Copyright (C) 2026 DBIO Authors | ||
| 72 | Portions Copyright (C) 2005-2025 DBIx::Class Authors | ||
| 73 | Based on DBIx::Class, heavily modified. | ||
| 74 | |||
| 75 | This is free software; you can redistribute it and/or modify it under | ||
| 76 | the same terms as the Perl 5 programming language system itself. | ||
| 77 | |||
| 78 | =cut | ||