DBIx-Custom / t / common-sqlite-quote.t /
Newer Older
40 lines | 1.449kb
test cleanup
Yuki Kimoto authored on 2011-08-08
1
use strict;
2
use warnings;
3

            
4
use FindBin;
5
$ENV{DBIX_CUSTOM_TEST_RUN} = 1;
6

            
7
use DBIx::Custom;
8
{
9
    package DBIx::Custom;
10
    no warnings 'redefine';
cleanup
Yuki Kimoto authored on 2011-08-10
11

            
test cleanup
Yuki Kimoto authored on 2011-08-10
12
    my $date_typename = 'Date';
13
    my $datetime_typename = 'Datetime';
14
    
15
    sub date_typename { lc $date_typename }
16
    sub datetime_typename { lc $datetime_typename }
17

            
18
    my $date_datatype = 'Date';
19
    my $datetime_datatype = 'Datetime';
20
    
21
    sub date_datatype { lc $date_datatype }
22
    sub datetime_datatype { lc $datetime_datatype }
cleanup
Yuki Kimoto authored on 2011-08-10
23

            
fixed SQL Server tests
Yuki Kimoto authored on 2011-08-14
24
    has datetime_suffix => '';
25

            
test cleanup
Yuki Kimoto authored on 2011-08-10
26
    has dsn => 'dbi:SQLite:dbname=:memory:';
test cleanup
Yuki Kimoto authored on 2011-08-08
27
    sub quote { '""' }
cleanup test
Yuki Kimoto authored on 2011-08-10
28
    sub create_table1 { 'create table table1 (key1 varchar, key2 varchar);' }
29
    sub create_table1_2 {'create table table1 (key1 varchar, key2 varchar, key3 varchar, key4 varchar, key5 varchar);' }
test cleanup
Yuki Kimoto authored on 2011-08-10
30
    sub create_table1_type { "create table table1 (key1 $date_typename, key2 $datetime_typename);" }
cleanup test
Yuki Kimoto authored on 2011-08-10
31
    
32
    sub create_table1_highperformance { "create table table1 (ab varchar, bc varchar, ik varchar, hi varchar, ui varchar, pq varchar, dc varchar);" }
33
    
34
    sub create_table2 { 'create table table2 (key1 varchar, key3 varchar);' }
35
    sub create_table2_2 { "create table table2 (key1 varchar, key2 varchar, key3 varchar)" }
36
    sub create_table3 { "create table table3 (key1 varchar, key2 varchar, key3 varchar)" }
37
    sub create_table_reserved { 'create table "table" ("select" varchar, "update" varchar)' }
test cleanup
Yuki Kimoto authored on 2011-08-08
38
}
39

            
40
require "$FindBin::Bin/common.t";