2 role SQL::Translator::Parser::DBI::SQLite {
3 use MooseX::Types::Moose qw(HashRef);
4 use SQL::Translator::Constants qw(:sqlt_types);
6 my %data_type_mapping = (
7 'text' => SQL_LONGVARCHAR(),
8 'timestamp' => SQL_TIMESTAMP(),
9 'timestamp without time zone' => SQL_TYPE_TIMESTAMP(),
10 'timestamp' => SQL_TYPE_TIMESTAMP_WITH_TIMEZONE(),
11 'integer' => SQL_INTEGER(),
12 'character' => SQL_CHAR(),
13 'varchar' => SQL_VARCHAR(),
14 'bigint' => SQL_BIGINT(),
17 method _column_data_type(HashRef $column_info) {
18 print $column_info->{TYPE_NAME} . "\n";
19 my $data_type = defined $data_type_mapping{$column_info->{TYPE_NAME}} ?
20 $data_type_mapping{$column_info->{TYPE_NAME}} :