| 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 | =pod | ||
| 25 | |||
| 26 | =head4 SimilarProducts (table, readonly) | ||
| 27 | |||
| 28 | URLs of similar products, keyed by ASIN. | ||
| 29 | |||
| 30 | =over 4 | ||
| 31 | |||
| 32 | =item ASIN | ||
| 33 | |||
| 34 | =item SimilarASIN | ||
| 35 | |||
| 36 | =item Title - hopefully this is same for all products! | ||
| 37 | |||
| 38 | =back | ||
| 39 | |||
| 40 | =cut | ||
| 41 | |||
| 42 | package SQL::Amazon::Tables::SimilarProducts; | ||
| 43 | |||
| 44 | use DBI qw(:sql_types); | ||
| 45 | use base qw(SQL::Amazon::Tables::Table); | ||
| 46 | use strict; | ||
| 47 | |||
| 48 | our %metadata = ( | ||
| 49 | NAME => [ | ||
| 50 | qw/ASIN SimilarASIN Title/ | ||
| 51 | ], | ||
| 52 | TYPE => [ | ||
| 53 | SQL_VARCHAR, SQL_VARCHAR, SQL_VARCHAR ], | ||
| 54 | PRECISION => [ 32, 32, 256 ], | ||
| 55 | SCALE => [undef, undef, undef], | ||
| 56 | NULLABLE => [ undef, undef, undef ] | ||
| 57 | ); | ||
| 58 | |||
| 59 | sub new { | ||
| 60 | my $class = shift; | ||
| 61 | my $obj = $class->SUPER::new(\%metadata); | ||
| 62 | $obj->{_key_cols} = [ 0, 1]; | ||
| 63 | return $obj; | ||
| 64 | } | ||
| 65 | |||
| 66 | 1; | ||
| 67 |