<?xml version="1.0"?>
<ZopeData>
  <record id="1" aka="AAAAAAAAAAE=">
    <pickle>
      <tuple>
        <global name="SQL" module="Products.ZSQLMethods.SQL"/>
        <tuple/>
      </tuple>
    </pickle>
    <pickle>
      <dictionary>
        <item>
            <key> <string>__ac_local_roles__</string> </key>
            <value>
              <none/>
            </value>
        </item>
        <item>
            <key> <string>_arg</string> </key>
            <value>
              <object>
                <klass>
                  <global name="Args" module="Shared.DC.ZRDB.Aqueduct"/>
                </klass>
                <tuple/>
                <state>
                  <dictionary>
                    <item>
                        <key> <string>_data</string> </key>
                        <value>
                          <dictionary>
                            <item>
                                <key> <string>column_id_list</string> </key>
                                <value>
                                  <dictionary>
                                    <item>
                                        <key> <string>type</string> </key>
                                        <value> <string>list</string> </value>
                                    </item>
                                  </dictionary>
                                </value>
                            </item>
                            <item>
                                <key> <string>column_value_list_list</string> </key>
                                <value>
                                  <dictionary>
                                    <item>
                                        <key> <string>type</string> </key>
                                        <value> <string>list</string> </value>
                                    </item>
                                  </dictionary>
                                </value>
                            </item>
                            <item>
                                <key> <string>date</string> </key>
                                <value>
                                  <dictionary/>
                                </value>
                            </item>
                            <item>
                                <key> <string>group_by_expression</string> </key>
                                <value>
                                  <dictionary/>
                                </value>
                            </item>
                            <item>
                                <key> <string>simulation_state</string> </key>
                                <value>
                                  <dictionary>
                                    <item>
                                        <key> <string>default</string> </key>
                                        <value> <string>delivered</string> </value>
                                    </item>
                                  </dictionary>
                                </value>
                            </item>
                            <item>
                                <key> <string>where_expression</string> </key>
                                <value>
                                  <dictionary/>
                                </value>
                            </item>
                          </dictionary>
                        </value>
                    </item>
                    <item>
                        <key> <string>_keys</string> </key>
                        <value>
                          <list>
                            <string>column_value_list_list</string>
                            <string>column_id_list</string>
                            <string>group_by_expression</string>
                            <string>date</string>
                            <string>simulation_state</string>
                            <string>where_expression</string>
                          </list>
                        </value>
                    </item>
                  </dictionary>
                </state>
              </object>
            </value>
        </item>
        <item>
            <key> <string>_owner</string> </key>
            <value>
              <none/>
            </value>
        </item>
        <item>
            <key> <string>arguments_src</string> </key>
            <value> <string>column_value_list_list:list\r\n
column_id_list:list\r\n
group_by_expression\r\n
date\r\n
simulation_state=delivered\r\n
where_expression</string> </value>
        </item>
        <item>
            <key> <string>connection_id</string> </key>
            <value> <string>erp5_sql_connection</string> </value>
        </item>
        <item>
            <key> <string>id</string> </key>
            <value> <string>Resource_zGetFullInventoryDate</string> </value>
        </item>
        <item>
            <key> <string>src</string> </key>
            <value> <string encoding="cdata"><![CDATA[

SELECT\n
  MAX(date) as date,\n
  <dtml-var group_by_expression>\n
FROM\n
  inventory\n
WHERE\n
  is_full_inventory = TRUE\n
  <dtml-if simulation_state>\n
    AND simulation_state = <dtml-sqlvar simulation_state type="string">\n
  </dtml-if>\n
  <dtml-in prefix="loop" expr="_.range(_.len(column_id_list))">\n
    AND <dtml-var expr="column_id_list[loop_item]"> IN (\n
    <dtml-in expr="column_value_list_list[loop_item]">\n
      <dtml-sqlvar sequence-item type="int">\n
      <dtml-if sequence-end><dtml-else>,</dtml-if>\n
    </dtml-in>\n
    )\n
  </dtml-in>\n
  <dtml-if date>\n
    AND date <= <dtml-sqlvar date type="string">\n
  </dtml-if>\n
  <dtml-if where_expression>\n
    AND <dtml-var where_expression>\n
  </dtml-if>\n
GROUP BY\n
  <dtml-var group_by_expression>\n


]]></string> </value>
        </item>
        <item>
            <key> <string>template</string> </key>
            <value>
              <object>
                <klass>
                  <global name="__newobj__" module="copy_reg"/>
                </klass>
                <tuple>
                  <global name="SQL" module="Shared.DC.ZRDB.DA"/>
                </tuple>
                <state>
                  <dictionary>
                    <item>
                        <key> <string>__name__</string> </key>
                        <value> <string encoding="cdata"><![CDATA[

<string>

]]></string> </value>
                    </item>
                    <item>
                        <key> <string>_vars</string> </key>
                        <value>
                          <dictionary/>
                        </value>
                    </item>
                    <item>
                        <key> <string>globals</string> </key>
                        <value>
                          <dictionary/>
                        </value>
                    </item>
                    <item>
                        <key> <string>raw</string> </key>
                        <value> <string encoding="cdata"><![CDATA[

SELECT\n
  MAX(date) as date,\n
  <dtml-var group_by_expression>\n
FROM\n
  inventory\n
WHERE\n
  is_full_inventory = TRUE\n
  <dtml-if simulation_state>\n
    AND simulation_state = <dtml-sqlvar simulation_state type="string">\n
  </dtml-if>\n
  <dtml-in prefix="loop" expr="_.range(_.len(column_id_list))">\n
    AND <dtml-var expr="column_id_list[loop_item]"> IN (\n
    <dtml-in expr="column_value_list_list[loop_item]">\n
      <dtml-sqlvar sequence-item type="int">\n
      <dtml-if sequence-end><dtml-else>,</dtml-if>\n
    </dtml-in>\n
    )\n
  </dtml-in>\n
  <dtml-if date>\n
    AND date <= <dtml-sqlvar date type="string">\n
  </dtml-if>\n
  <dtml-if where_expression>\n
    AND <dtml-var where_expression>\n
  </dtml-if>\n
GROUP BY\n
  <dtml-var group_by_expression>\n


]]></string> </value>
                    </item>
                  </dictionary>
                </state>
              </object>
            </value>
        </item>
        <item>
            <key> <string>title</string> </key>
            <value> <string></string> </value>
        </item>
      </dictionary>
    </pickle>
  </record>
</ZopeData>
