1 | <?php |
||
34 | class SqlStatementRepository extends \TechDivision\Import\Product\Repositories\SqlStatementRepository |
||
35 | { |
||
36 | |||
37 | /** |
||
38 | * The SQL statements. |
||
39 | * |
||
40 | * @var array |
||
41 | */ |
||
42 | private $statements = array( |
||
|
|||
43 | SqlStatementKeys::PRODUCT_LINK => |
||
44 | 'SELECT * |
||
45 | FROM catalog_product_link |
||
46 | WHERE product_id = :product_id |
||
47 | AND linked_product_id = :linked_product_id |
||
48 | AND link_type_id = :link_type_id', |
||
49 | SqlStatementKeys::PRODUCT_LINK_ATTRIBUTE_INT => |
||
50 | 'SELECT * |
||
51 | FROM catalog_product_link_attribute_int |
||
52 | WHERE product_link_attribute_id = :product_link_attribute_id |
||
53 | AND link_id = :link_id', |
||
54 | SqlStatementKeys::CREATE_PRODUCT_LINK => |
||
55 | 'INSERT |
||
56 | INTO catalog_product_link |
||
57 | (product_id, |
||
58 | linked_product_id, |
||
59 | link_type_id) |
||
60 | VALUES (:product_id, |
||
61 | :linked_product_id, |
||
62 | :link_type_id)', |
||
63 | SqlStatementKeys::UPDATE_PRODUCT_LINK => |
||
64 | 'UPDATE catalog_product_link |
||
65 | SET product_id = :product_id, |
||
66 | linked_product_id = :linked_product_id, |
||
67 | link_type_id = :link_type_id |
||
68 | WHERE link_id = :link_id', |
||
69 | SqlStatementKeys::CREATE_PRODUCT_LINK_ATTRIBUTE_INT => |
||
70 | 'INSERT |
||
71 | INTO catalog_product_link_attribute_int |
||
72 | (product_link_attribute_id, |
||
73 | link_id, |
||
74 | value) |
||
75 | VALUES (:product_link_attribute_id, |
||
76 | :link_id, |
||
77 | :value)', |
||
78 | SqlStatementKeys::UPDATE_PRODUCT_LINK_ATTRIBUTE_INT => |
||
79 | 'UPDATE catalog_product_link_attribute_int |
||
80 | SET product_link_attribute_id = :product_link_attribute_id, |
||
81 | link_id = :link_id, |
||
82 | value = :value |
||
83 | WHERE value_id = :value_id' |
||
84 | ); |
||
85 | |||
86 | /** |
||
87 | * Initialize the the SQL statements. |
||
88 | */ |
||
89 | public function __construct() |
||
97 | } |
||
98 |