Alzabo
view release on metacpan or search on metacpan
lib/Alzabo/RDBMSRules.pm view on Meta::CPAN
type.
=head2 type_is_floating_point (C<Alzabo::Column> object)
Returns a boolean indicating whether or not the column is a floating
point type.
=head2 type_is_character (C<Alzabo::Column> object)
Returns a boolean indicating whether or not the column is a character
type. This is defined as any type which is defined to store text,
regardless of length.
=head2 type_is_date (C<Alzabo::Column> object)
Returns a boolean indicating whether or not the column is a date type.
This is B<not> true for datetime types.
=head2 type_is_datetime (C<Alzabo::Column> object)
Returns a boolean indicating whether or not the column is a datetime
type. This is B<not> true for date types.
=head2 type_is_time (C<Alzabo::Column> object)
Returns a boolean indicating whether or not the column is a time type.
This is B<not> true for datetime types.
=head2 type_is_time_interval (C<Alzabo::Column> object)
Returns a boolean indicating whether or not the column is a time
interval type.
=head1 SUBCLASSING Alzabo::RDBMSRules
To create a subclass of C<Alzabo::RDBMSRules> for your particular
RDBMS is fairly simple.
Here's a sample header to the module using a fictional RDBMS called
FooDB:
package Alzabo::RDBMSRules::FooDB;
use strict;
use vars qw($VERSION);
use Alzabo::RDBMSRules;
use base qw(Alzabo::RDBMSRules);
The next step is to implement a C<new()> method and the methods listed
under the section L<Virtual Methods>. The new method should look a
bit like this:
1: sub new
2: {
3: my $proto = shift;
4: my $class = ref $proto || $proto;
5: my %p = @_;
6:
7: my $self = bless {}, $self;
8:
9: return $self;
10: }
The hash %p contains any values passed to the
L<C<Alzabo::RDBMSRules-E<gt>new>|Alzabo::RDBMSRules/new> method by its
caller.
Lines 1-7 should probably be copied verbatim into your own C<new>
method. Line 5 can be deleted if you don't need to look at the
parameters.
The rest of your module should simply implement the methods listed
under the L<Virtual Methods> section of this documentation.
Look at the included C<Alzabo::RDBMSRules> subclasses for examples.
Feel free to contact me for further help if you get stuck. Please
tell me what database you're attempting to implement, and include the
code you've written so far.
=head1 AUTHOR
Dave Rolsky, <dave@urth.org>
=cut
( run in 1.405 second using v1.01-cache-2.11-cpan-437f7b0c052 )