line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# |
2
|
|
|
|
|
|
|
# Copyright (c) 2005, Presicient Corp., USA |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
# Permission is granted to use this software according to the terms of the |
5
|
|
|
|
|
|
|
# Artistic License, as specified in the Perl README file, |
6
|
|
|
|
|
|
|
# with the exception that commercial redistribution, either |
7
|
|
|
|
|
|
|
# electronic or via physical media, as either a standalone package, |
8
|
|
|
|
|
|
|
# or incorporated into a third party product, requires prior |
9
|
|
|
|
|
|
|
# written approval of the author. |
10
|
|
|
|
|
|
|
# |
11
|
|
|
|
|
|
|
# This software is distributed in the hope that it will be useful, |
12
|
|
|
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
13
|
|
|
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
14
|
|
|
|
|
|
|
# |
15
|
|
|
|
|
|
|
# Presicient Corp. reserves the right to provide support for this software |
16
|
|
|
|
|
|
|
# to individual sites under a separate (possibly fee-based) |
17
|
|
|
|
|
|
|
# agreement. |
18
|
|
|
|
|
|
|
# |
19
|
|
|
|
|
|
|
# History: |
20
|
|
|
|
|
|
|
# |
21
|
|
|
|
|
|
|
# 2005-Jan-27 D. Arnold |
22
|
|
|
|
|
|
|
# Coded. |
23
|
|
|
|
|
|
|
# |
24
|
|
|
|
|
|
|
package SQL::Amazon::Tables::SysSchema; |
25
|
1
|
|
|
1
|
|
6
|
use DBI qw(:sql_types); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
602
|
|
26
|
1
|
|
|
1
|
|
6
|
use base qw(SQL::Amazon::Tables::Table); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
682
|
|
27
|
1
|
|
|
1
|
|
8
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
322
|
|
28
|
|
|
|
|
|
|
my %amzn_catalog = ( |
29
|
|
|
|
|
|
|
'BOOKS', [ undef, undef, 'BOOKS', 'VIEW', 'Base view for Book products' ], |
30
|
|
|
|
|
|
|
'BROWSENODES', [ undef, undef, 'BROWSENODES', 'VIEW', 'Lists BrowseNode names and identifiers associated with a given ASIN' ], |
31
|
|
|
|
|
|
|
'CUSTOMERREVIEWS', [ undef, undef, 'CUSTOMERREVIEWS', 'VIEW', 'Lists customer reviews for a given ASIN' ], |
32
|
|
|
|
|
|
|
'EDITORIALREVIEWS', [ undef, undef, 'EDITORIALREVIEWS', 'VIEW', 'Lists editorial reviews for a given ASIN' ], |
33
|
|
|
|
|
|
|
'LISTMANIALISTS', [ undef, undef, 'LISTMANIALISTS', 'VIEW', 'Lists ListManiaLists which reference the given ASIN' ], |
34
|
|
|
|
|
|
|
'MERCHANTS', [ undef, undef, 'MERCHANTS', 'VIEW', 'Lists publicly available information for merchants' ], |
35
|
|
|
|
|
|
|
'OFFERS', [ undef, undef, 'OFFERS', 'VIEW', 'Lists available offer details for a specified ASIN' ], |
36
|
|
|
|
|
|
|
'SYSSCHEMA', [ undef, undef, 'SYSSCHEMA', 'SYSTEM TABLE', 'The schema catalog table for DBD::Amazon' ], |
37
|
|
|
|
|
|
|
'SIMILARPRODUCTS', [ undef, undef, 'SIMILARPRODUCTS', 'VIEW', 'Lists Similar products for a given ASIN' ], |
38
|
|
|
|
|
|
|
); |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
my @amzn_columns = qw( |
41
|
|
|
|
|
|
|
TABLE_CAT |
42
|
|
|
|
|
|
|
TABLE_SCHEM |
43
|
|
|
|
|
|
|
TABLE_NAME |
44
|
|
|
|
|
|
|
TABLE_TYPE |
45
|
|
|
|
|
|
|
REMARKS |
46
|
|
|
|
|
|
|
); |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
our %metadata = ( |
49
|
|
|
|
|
|
|
NAME => [ |
50
|
|
|
|
|
|
|
qw/TABLE_CAT |
51
|
|
|
|
|
|
|
TABLE_SCHEM |
52
|
|
|
|
|
|
|
TABLE_NAME |
53
|
|
|
|
|
|
|
TABLE_TYPE |
54
|
|
|
|
|
|
|
REMARKS/ |
55
|
|
|
|
|
|
|
], |
56
|
|
|
|
|
|
|
TYPE => [ |
57
|
|
|
|
|
|
|
SQL_VARCHAR, |
58
|
|
|
|
|
|
|
SQL_VARCHAR, |
59
|
|
|
|
|
|
|
SQL_VARCHAR, |
60
|
|
|
|
|
|
|
SQL_VARCHAR, |
61
|
|
|
|
|
|
|
SQL_VARCHAR, |
62
|
|
|
|
|
|
|
], |
63
|
|
|
|
|
|
|
PRECISION => [ |
64
|
|
|
|
|
|
|
256, |
65
|
|
|
|
|
|
|
256, |
66
|
|
|
|
|
|
|
256, |
67
|
|
|
|
|
|
|
256, |
68
|
|
|
|
|
|
|
256, |
69
|
|
|
|
|
|
|
], |
70
|
|
|
|
|
|
|
SCALE => [], |
71
|
|
|
|
|
|
|
NULLABLE => [ |
72
|
|
|
|
|
|
|
1, |
73
|
|
|
|
|
|
|
1, |
74
|
|
|
|
|
|
|
undef, |
75
|
|
|
|
|
|
|
undef, |
76
|
|
|
|
|
|
|
1 |
77
|
|
|
|
|
|
|
] |
78
|
|
|
|
|
|
|
); |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
sub new { |
81
|
0
|
|
|
0
|
0
|
|
my $class = shift; |
82
|
0
|
|
|
|
|
|
my $obj = $class->SUPER::new(\%metadata); |
83
|
0
|
|
|
|
|
|
$obj->{_local} = 1; |
84
|
0
|
|
|
|
|
|
$obj->{_cache_only} = 1; |
85
|
0
|
|
|
|
|
|
$obj->{_key_cols} = [ 0, 1, 2 ]; |
86
|
|
|
|
|
|
|
$obj->save_row($_, undef, 1) |
87
|
0
|
|
|
|
|
|
foreach (values %amzn_catalog); |
88
|
0
|
|
|
|
|
|
return $obj; |
89
|
|
|
|
|
|
|
} |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
1; |
92
|
|
|
|
|
|
|
|