...
|
...
|
@@ -8,7 +8,37 @@ use DBIx::Custom;
|
8
|
8
|
{
|
9
|
9
|
package DBIx::Custom;
|
10
|
10
|
no warnings 'redefine';
|
11
|
|
-
|
|
11
|
+
|
|
12
|
+ my $table1 = 'table1';
|
|
13
|
+ my $table2 = 'table2';
|
|
14
|
+ my $table2_alias = 'table2_alias';
|
|
15
|
+ my $table3 = 'table3';
|
|
16
|
+ my $key1 = 'key1';
|
|
17
|
+ my $key2 = 'key2';
|
|
18
|
+ my $key3 = 'key3';
|
|
19
|
+ my $key4 = 'key4';
|
|
20
|
+ my $key5 = 'key5';
|
|
21
|
+ my $key6 = 'key6';
|
|
22
|
+ my $key7 = 'key7';
|
|
23
|
+ my $key8 = 'key8';
|
|
24
|
+ my $key9 = 'key9';
|
|
25
|
+ my $key10 = 'key10';
|
|
26
|
+
|
|
27
|
+ has table1 => $table1;
|
|
28
|
+ has table2 => $table2;
|
|
29
|
+ has table2_alias => $table2_alias;
|
|
30
|
+ has table3 => $table3;
|
|
31
|
+ has key1 => $key1;
|
|
32
|
+ has key2 => $key2;
|
|
33
|
+ has key3 => $key3;
|
|
34
|
+ has key4 => $key4;
|
|
35
|
+ has key5 => $key5;
|
|
36
|
+ has key6 => $key6;
|
|
37
|
+ has key7 => $key7;
|
|
38
|
+ has key8 => $key8;
|
|
39
|
+ has key9 => $key9;
|
|
40
|
+ has key10 => $key10;
|
|
41
|
+
|
12
|
42
|
my $date_typename = 'Date';
|
13
|
43
|
my $datetime_typename = 'Datetime';
|
14
|
44
|
|
...
|
...
|
@@ -22,17 +52,18 @@ use DBIx::Custom;
|
22
|
52
|
sub datetime_datatype { lc $datetime_datatype }
|
23
|
53
|
|
24
|
54
|
has dsn => 'dbi:SQLite:dbname=:memory:';
|
25
|
|
- sub quote { '""' }
|
26
|
|
- sub create_table1 { 'create table table1 (key1 varchar, key2 varchar);' }
|
27
|
|
- sub create_table1_2 {'create table table1 (key1 varchar, key2 varchar, key3 varchar, key4 varchar, key5 varchar);' }
|
28
|
|
- sub create_table1_type { "create table table1 (key1 $date_typename, key2 $datetime_typename);" }
|
|
55
|
+ sub create_table1 { "create table $table1 ($key1 varchar, $key2 varchar);" }
|
|
56
|
+ sub create_table1_2 {"create table $table1 ($key1 varchar, $key2 varchar, $key3 varchar, key4 varchar, key5 varchar);" }
|
|
57
|
+ sub create_table1_type { "create table $table1 ($key1 $date_typename, $key2 $datetime_typename);" }
|
29
|
58
|
|
30
|
|
- sub create_table1_highperformance { "create table table1 (ab varchar, bc varchar, ik varchar, hi varchar, ui varchar, pq varchar, dc varchar);" }
|
|
59
|
+ sub create_table1_highperformance { "create table $table1 (key1 varchar, key2 varchar, key3 varchar, key4 varchar, key5 varchar, key6 varchar, key7 varchar);" }
|
31
|
60
|
|
32
|
|
- sub create_table2 { 'create table table2 (key1 varchar, key3 varchar);' }
|
33
|
|
- sub create_table2_2 { "create table table2 (key1 varchar, key2 varchar, key3 varchar)" }
|
34
|
|
- sub create_table3 { "create table table3 (key1 varchar, key2 varchar, key3 varchar)" }
|
|
61
|
+ sub create_table2 { "create table $table2 ($key1 varchar, $key3 varchar);" }
|
|
62
|
+ sub create_table2_2 { "create table $table2 ($key1 varchar, $key2 varchar, $key3 varchar)" }
|
|
63
|
+ sub create_table3 { "create table $table3 ($key1 varchar, $key2 varchar, $key3 varchar)" }
|
35
|
64
|
sub create_table_reserved { 'create table "table" ("select" varchar, "update" varchar)' }
|
|
65
|
+
|
|
66
|
+ sub quote { '""' }
|
36
|
67
|
}
|
37
|
68
|
|
38
|
69
|
require "$FindBin::Bin/common.t";
|