SQL/Amazon/Tables/SysSchema.pm

filter: Statementstmt 65.0% 13 / 20 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 3 / 4 Podpod 0.0% 0 / 1 totaltotal 64.0% 16 / 25 CC 2 SCAR 11.0
CC
2
Cov
65%
new
6.0
BEGIN
1.0
BEGIN
1.0
CRAP 3.0
« DBD/Amazon.pm ↑ Summary SQL/Amazon/Tables/BrowseNodes.pm »
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 ▶use DBI qw(:sql_types);
Subroutine BEGIN: called CC=1 SCAR=0.0
26 1 ▶use base qw(SQL::Amazon::Tables::Table);
Subroutine BEGIN: called CC=1 SCAR=0.0
27 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
28 1 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 1 my @amzn_columns = qw(
41 TABLE_CAT
42 TABLE_SCHEM
43 TABLE_NAME
44 TABLE_TYPE
45 REMARKS
46 );
47  
48 1 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 0 ▶sub new {
Subroutine new: not called CC=2 SCAR=17.9
Pod undocumented
81 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 1;
92  
« DBD/Amazon.pm ↑ Summary SQL/Amazon/Tables/BrowseNodes.pm »