1package DBIx::Class::Schema::Loader::DBI::Sybase::Common; 2 3use strict; 4use warnings; 5use base 'DBIx::Class::Schema::Loader::DBI'; 6use mro 'c3'; 7 8our $VERSION = '0.07033'; 9 10=head1 NAME 11 12DBIx::Class::Schema::Loader::DBI::Sybase::Common - Common methods for Sybase 13and MSSQL 14 15=head1 DESCRIPTION 16 17See L<DBIx::Class::Schema::Loader> and L<DBIx::Class::Schema::Loader::Base>. 18 19=cut 20 21# DBD::Sybase doesn't implement get_info properly 22sub _build_quote_char { '[]' } 23sub _build_name_sep { '.' } 24 25sub _setup { 26 my $self = shift; 27 28 $self->next::method(@_); 29 30 $self->schema->storage->sql_maker->quote_char([qw/[ ]/]); 31 $self->schema->storage->sql_maker->name_sep('.'); 32} 33 34# remove 'IDENTITY' from column data_type 35sub _columns_info_for { 36 my $self = shift; 37 my $result = $self->next::method(@_); 38 39 foreach my $col (keys %$result) { 40 $result->{$col}->{data_type} =~ s/\s* identity \s*//ix; 41 } 42 43 return $result; 44} 45 46=head1 SEE ALSO 47 48L<DBIx::Class::Schema::Loader::DBI::Sybase>, 49L<DBIx::Class::Schema::Loader::DBI::MSSQL>, 50L<DBIx::Class::Schema::Loader::DBI::ODBC::Microsoft_SQL_Server>, 51L<DBIx::Class::Schema::Loader::DBI::Sybase::Microsoft_SQL_Server>, 52L<DBIx::Class::Schema::Loader::DBI> 53L<DBIx::Class::Schema::Loader>, L<DBIx::Class::Schema::Loader::Base>, 54 55=head1 AUTHOR 56 57See L<DBIx::Class::Schema::Loader/AUTHOR> and L<DBIx::Class::Schema::Loader/CONTRIBUTORS>. 58 59=head1 LICENSE 60 61This library is free software; you can redistribute it and/or modify it under 62the same terms as Perl itself. 63 64=cut 65 661; 67