Commit 3777619a authored by Jean-Paul Smets's avatar Jean-Paul Smets

Moved out for erp5_dms to erp5_dms_mysql_innodb since it is better to split...

Moved out for erp5_dms to erp5_dms_mysql_innodb since it is better to split SQL methods to gain database independence.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13372 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 288cde53
<catalog_method>
<item key="sql_clear_catalog" type="int">
<value>1</value>
</item>
</catalog_method>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.ZSQLMethods.SQL</string>
<string>SQL</string>
</tuple>
<none/>
</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/>
</value>
</item>
<item>
<key> <string>_keys</string> </key>
<value>
<list/>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>arguments_src</string> </key>
<value> <string></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>z0_drop_email</string> </value>
</item>
<item>
<key> <string>src</string> </key>
<value> <string>DROP TABLE email;</string> </value>
</item>
<item>
<key> <string>template</string> </key>
<value>
<object>
<klass>
<global name="SQL" module="Shared.DC.ZRDB.DA"/>
</klass>
<none/>
<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>DROP TABLE email;</string> </value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<catalog_method>
<item key="sql_uncatalog_object" type="int">
<value>1</value>
</item>
</catalog_method>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.ZSQLMethods.SQL</string>
<string>SQL</string>
</tuple>
<none/>
</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>uid</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>_keys</string> </key>
<value>
<list>
<string>uid</string>
</list>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>arguments_src</string> </key>
<value> <string>uid</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>z0_uncatalog_email</string> </value>
</item>
<item>
<key> <string>src</string> </key>
<value> <string encoding="cdata"><![CDATA[
DELETE FROM email WHERE <dtml-sqltest uid op=eq type=int>
]]></string> </value>
</item>
<item>
<key> <string>template</string> </key>
<value>
<object>
<klass>
<global name="SQL" module="Shared.DC.ZRDB.DA"/>
</klass>
<none/>
<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[
DELETE FROM email WHERE <dtml-sqltest uid op=eq type=int>
]]></string> </value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<catalog_method>
<item key="sql_catalog_object_list" type="int">
<value>1</value>
</item>
</catalog_method>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.ZSQLMethods.SQL</string>
<string>SQL</string>
</tuple>
<none/>
</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>CreationDate</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>Creator</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>Date</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>EffectiveDate</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>ExpiresDate</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>ModificationDate</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>PrincipiaSearchSource</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>SearchableText</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>Type</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>bobobase_modification_time</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>created</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>effective</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>expires</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>getIcon</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>in_reply_to</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>language</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>modified</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>review_state</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>revision</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>summary</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>uid</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>_keys</string> </key>
<value>
<list>
<string>uid</string>
<string>Creator</string>
<string>Date</string>
<string>PrincipiaSearchSource</string>
<string>SearchableText</string>
<string>CreationDate</string>
<string>EffectiveDate</string>
<string>ExpiresDate</string>
<string>ModificationDate</string>
<string>Type</string>
<string>bobobase_modification_time</string>
<string>created</string>
<string>effective</string>
<string>expires</string>
<string>getIcon</string>
<string>in_reply_to</string>
<string>modified</string>
<string>review_state</string>
<string>summary</string>
<string>language</string>
<string>version</string>
<string>revision</string>
<string>short_title</string>
</list>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>allow_simple_one_argument_traversal</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>arguments_src</string> </key>
<value> <string>uid\r\n
Creator\r\n
Date\r\n
PrincipiaSearchSource\r\n
SearchableText\r\n
CreationDate\r\n
EffectiveDate\r\n
ExpiresDate\r\n
ModificationDate\r\n
Type\r\n
bobobase_modification_time\r\n
created\r\n
effective\r\n
expires\r\n
getIcon\r\n
in_reply_to\r\n
modified\r\n
review_state\r\n
summary\r\n
language\r\n
version\r\n
revision\r\n
short_title</string> </value>
</item>
<item>
<key> <string>cache_time_</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>class_file_</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>class_name_</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>connection_hook</string> </key>
<value>
<none/>
</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>z_catalog_compatibility_list</string> </value>
</item>
<item>
<key> <string>max_cache_</string> </key>
<value> <int>100</int> </value>
</item>
<item>
<key> <string>max_rows_</string> </key>
<value> <int>1000</int> </value>
</item>
<item>
<key> <string>src</string> </key>
<value> <string encoding="cdata"><![CDATA[
REPLACE INTO\n
compatibility\n
VALUES\n
<dtml-in prefix="loop" expr="_.range(_.len(uid))">\n
(\n
<dtml-sqlvar expr="uid[loop_item]" type="int">, \n
<dtml-sqlvar expr="Creator[loop_item]" type="datetime" optional>,\n
<dtml-sqlvar expr="Date[loop_item]" type="datetime" optional>,\n
<dtml-sqlvar expr="PrincipiaSearchSource[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="SearchableText[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="CreationDate[loop_item]" type="datetime" optional>,\n
<dtml-sqlvar expr="EffectiveDate[loop_item]" type="datetime" optional>,\n
<dtml-sqlvar expr="ExpiresDate[loop_item]" type="datetime" optional>,\n
<dtml-sqlvar expr="ModificationDate[loop_item]" type="datetime" optional>,\n
<dtml-sqlvar expr="Type[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="bobobase_modification_time[loop_item]" type="datetime" optional>,\n
<dtml-sqlvar expr="created[loop_item]" type="datetime" optional>,\n
<dtml-sqlvar expr="effective[loop_item]" type="datetime" optional>,\n
<dtml-sqlvar expr="expires[loop_item]" type="datetime" optional>,\n
<dtml-sqlvar expr="getIcon[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="in_reply_to[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="modified[loop_item]" type="datetime" optional>,\n
<dtml-sqlvar expr="review_state[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="summary[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="language[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="version[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="short_title[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="revision[loop_item]" type="string" optional>\n
)\n
<dtml-if sequence-end>\n
<dtml-else>\n
,\n
</dtml-if>\n
</dtml-in>\n
]]></string> </value>
</item>
<item>
<key> <string>template</string> </key>
<value>
<object>
<klass>
<global name="SQL" module="Shared.DC.ZRDB.DA"/>
</klass>
<none/>
<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[
REPLACE INTO\n
compatibility\n
VALUES\n
<dtml-in prefix="loop" expr="_.range(_.len(uid))">\n
(\n
<dtml-sqlvar expr="uid[loop_item]" type="int">, \n
<dtml-sqlvar expr="Creator[loop_item]" type="datetime" optional>,\n
<dtml-sqlvar expr="Date[loop_item]" type="datetime" optional>,\n
<dtml-sqlvar expr="PrincipiaSearchSource[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="SearchableText[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="CreationDate[loop_item]" type="datetime" optional>,\n
<dtml-sqlvar expr="EffectiveDate[loop_item]" type="datetime" optional>,\n
<dtml-sqlvar expr="ExpiresDate[loop_item]" type="datetime" optional>,\n
<dtml-sqlvar expr="ModificationDate[loop_item]" type="datetime" optional>,\n
<dtml-sqlvar expr="Type[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="bobobase_modification_time[loop_item]" type="datetime" optional>,\n
<dtml-sqlvar expr="created[loop_item]" type="datetime" optional>,\n
<dtml-sqlvar expr="effective[loop_item]" type="datetime" optional>,\n
<dtml-sqlvar expr="expires[loop_item]" type="datetime" optional>,\n
<dtml-sqlvar expr="getIcon[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="in_reply_to[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="modified[loop_item]" type="datetime" optional>,\n
<dtml-sqlvar expr="review_state[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="summary[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="language[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="version[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="short_title[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="revision[loop_item]" type="string" optional>\n
)\n
<dtml-if sequence-end>\n
<dtml-else>\n
,\n
</dtml-if>\n
</dtml-in>\n
]]></string> </value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<catalog_method>
<item key="sql_catalog_object_list" type="int">
<value>1</value>
</item>
</catalog_method>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.ZSQLMethods.SQL</string>
<string>SQL</string>
</tuple>
<none/>
</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>getPortalType</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>getUrlString</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>uid</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>_keys</string> </key>
<value>
<list>
<string>uid</string>
<string>getUrlString</string>
<string>getPortalType</string>
</list>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>arguments_src</string> </key>
<value> <string>uid\r\n
getUrlString\r\n
getPortalType</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>z_catalog_email_list</string> </value>
</item>
<item>
<key> <string>src</string> </key>
<value> <string encoding="cdata"><![CDATA[
<dtml-let email_list="[]">\n
<dtml-in prefix="loop" expr="_.range(_.len(uid))">\n
<dtml-if expr="getPortalType[loop_item]==\'Email\'">\n
<dtml-call expr="email_list.append(loop_item)">\n
</dtml-if>\n
</dtml-in>\n
<dtml-if expr="_.len(email_list) > 0">\n
REPLACE INTO\n
email\n
VALUES\n
<dtml-in prefix="loop" expr="email_list">\n
(\n
<dtml-sqlvar expr="uid[loop_item]" type="int">, \n
<dtml-sqlvar expr="getUrlString[loop_item]" type="string" optional>\n
)\n
<dtml-if sequence-end><dtml-else>,</dtml-if>\n
</dtml-in>\n
</dtml-if>\n
</dtml-let>
]]></string> </value>
</item>
<item>
<key> <string>template</string> </key>
<value>
<object>
<klass>
<global name="SQL" module="Shared.DC.ZRDB.DA"/>
</klass>
<none/>
<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[
<dtml-let email_list="[]">\n
<dtml-in prefix="loop" expr="_.range(_.len(uid))">\n
<dtml-if expr="getPortalType[loop_item]==\'Email\'">\n
<dtml-call expr="email_list.append(loop_item)">\n
</dtml-if>\n
</dtml-in>\n
<dtml-if expr="_.len(email_list) > 0">\n
REPLACE INTO\n
email\n
VALUES\n
<dtml-in prefix="loop" expr="email_list">\n
(\n
<dtml-sqlvar expr="uid[loop_item]" type="int">, \n
<dtml-sqlvar expr="getUrlString[loop_item]" type="string" optional>\n
)\n
<dtml-if sequence-end><dtml-else>,</dtml-if>\n
</dtml-in>\n
</dtml-if>\n
</dtml-let>
]]></string> </value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<catalog_method>
<item key="sql_clear_catalog" type="int">
<value>1</value>
</item>
</catalog_method>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.ZSQLMethods.SQL</string>
<string>SQL</string>
</tuple>
<none/>
</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/>
</value>
</item>
<item>
<key> <string>_keys</string> </key>
<value>
<list/>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_col</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>allow_simple_one_argument_traversal</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>arguments_src</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>cache_time_</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>class_file_</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>class_name_</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>connection_hook</string> </key>
<value>
<none/>
</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>z_create_compatibility</string> </value>
</item>
<item>
<key> <string>max_cache_</string> </key>
<value> <int>100</int> </value>
</item>
<item>
<key> <string>max_rows_</string> </key>
<value> <int>1000</int> </value>
</item>
<item>
<key> <string>src</string> </key>
<value> <string># Host:\n
# Database: test\n
# Table: \'compatibility\'\n
#\n
CREATE TABLE `compatibility` (\n
`uid` BIGINT UNSIGNED NOT NULL,\n
`Creator` varchar(255) default \'\',\n
`Date` datetime default \'0000-00-00 00:00:00\',\n
`PrincipiaSearchSource` text,\n
`SearchableText` text,\n
`CreationDate` datetime default \'0000-00-00 00:00:00\',\n
`EffectiveDate` datetime default \'0000-00-00 00:00:00\',\n
`ExpiresDate` datetime default \'0000-00-00 00:00:00\',\n
`ModificationDate` datetime default \'0000-00-00 00:00:00\',\n
`Type` varchar(255) default \'\',\n
`bobobase_modification_time` datetime default \'0000-00-00 00:00:00\',\n
`created` datetime default \'0000-00-00 00:00:00\',\n
`effective` datetime default \'0000-00-00 00:00:00\',\n
`expires` datetime default \'0000-00-00 00:00:00\',\n
`getIcon` varchar(255) default \'\',\n
`in_reply_to` varchar(255) default \'\',\n
`modified` datetime default \'0000-00-00 00:00:00\',\n
`review_state` varchar(255) default \'\',\n
`summary` text,\n
`language` varchar(5) default \'\',\n
`version` varchar(10) default \'\',\n
`revision` varchar(10) default \'\',\n
`short_title` varchar(100) default \'\',\n
PRIMARY KEY (`uid`),\n
KEY `Type` (`Type`),\n
KEY `review_state` (`review_state`)\n
) TYPE=InnoDB;\n
</string> </value>
</item>
<item>
<key> <string>template</string> </key>
<value>
<object>
<klass>
<global name="SQL" module="Shared.DC.ZRDB.DA"/>
</klass>
<none/>
<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># Host:\n
# Database: test\n
# Table: \'compatibility\'\n
#\n
CREATE TABLE `compatibility` (\n
`uid` BIGINT UNSIGNED NOT NULL,\n
`Creator` varchar(255) default \'\',\n
`Date` datetime default \'0000-00-00 00:00:00\',\n
`PrincipiaSearchSource` text,\n
`SearchableText` text,\n
`CreationDate` datetime default \'0000-00-00 00:00:00\',\n
`EffectiveDate` datetime default \'0000-00-00 00:00:00\',\n
`ExpiresDate` datetime default \'0000-00-00 00:00:00\',\n
`ModificationDate` datetime default \'0000-00-00 00:00:00\',\n
`Type` varchar(255) default \'\',\n
`bobobase_modification_time` datetime default \'0000-00-00 00:00:00\',\n
`created` datetime default \'0000-00-00 00:00:00\',\n
`effective` datetime default \'0000-00-00 00:00:00\',\n
`expires` datetime default \'0000-00-00 00:00:00\',\n
`getIcon` varchar(255) default \'\',\n
`in_reply_to` varchar(255) default \'\',\n
`modified` datetime default \'0000-00-00 00:00:00\',\n
`review_state` varchar(255) default \'\',\n
`summary` text,\n
`language` varchar(5) default \'\',\n
`version` varchar(10) default \'\',\n
`revision` varchar(10) default \'\',\n
`short_title` varchar(100) default \'\',\n
PRIMARY KEY (`uid`),\n
KEY `Type` (`Type`),\n
KEY `review_state` (`review_state`)\n
) TYPE=InnoDB;\n
</string> </value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<catalog_method>
<item key="sql_clear_catalog" type="int">
<value>1</value>
</item>
</catalog_method>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.ZSQLMethods.SQL</string>
<string>SQL</string>
</tuple>
<none/>
</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/>
</value>
</item>
<item>
<key> <string>_keys</string> </key>
<value>
<list/>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_col</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>arguments_src</string> </key>
<value> <string></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>z_create_email</string> </value>
</item>
<item>
<key> <string>src</string> </key>
<value> <string>CREATE TABLE `email` (\n
`uid` BIGINT UNSIGNED NOT NULL,\n
`url_string` varchar(255),\n
PRIMARY KEY `uid` (`uid`),\n
KEY `url_string` (`url_string`)\n
) TYPE = InnoDB;</string> </value>
</item>
<item>
<key> <string>template</string> </key>
<value>
<object>
<klass>
<global name="SQL" module="Shared.DC.ZRDB.DA"/>
</klass>
<none/>
<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>CREATE TABLE `email` (\n
`uid` BIGINT UNSIGNED NOT NULL,\n
`url_string` varchar(255),\n
PRIMARY KEY `uid` (`uid`),\n
KEY `url_string` (`url_string`)\n
) TYPE = InnoDB;</string> </value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[
"""\n
This scripts parses a long string and does the following:\n
- processes arguments for searching by any category\n
- selects search mode\n
- adds creation and modification date clauses\n
- searches\n
- if requested, filters result so that only the user\'s docs are returned\n
- if requested, filters result to return only the newest versions\n
"""\n
from Products.ZSQLCatalog.SQLCatalog import Query\n
from Products.ZSQLCatalog.SQLCatalog import ComplexQuery\n
\n
if not sstr: return None\n
\n
args = context.parseSearchString(sstr)\n
query_list = []\n
\n
# process searching by category\n
cats = []\n
bases = context.portal_categories.getBaseCategoryList()\n
for k,v in args.items():\n
if k in bases:\n
args[k + \'_relative_url\'] = k + \'/\' + v\n
\n
# expand simplified notation of search mode\n
mode = args.get(\'mode\')\n
modemap = { \'natural\' : 0,\n
\'boolean\' : \'in_boolean_mode\',\n
\'expanded\': \'with_query_expansion\'}\n
if mode and modemap.has_key(mode):\n
args[\'SearchableText\'] = dict(query=args[\'SearchableText\'], search_mode=modemap[mode])\n
\n
# a hack because SQLCatalog wants table.key now \n
# dunno if it is a bug or a feature\n
if args.has_key(\'SearchableText\'):\n
args[\'full_text.SearchableText\'] = args[\'SearchableText\']\n
args.pop(\'SearchableText\')\n
\n
cf = kw.get(\'creation_from\')\n
ct = kw.get(\'creation_to\')\n
mf = kw.get(\'modification_from\')\n
mt = kw.get(\'modification_to\')\n
\n
wheres = []\n
if cf:\n
wheres.append(\'creation_date >"\' + cf.strftime(\'%Y-%m-%d\') + \'"\')\n
if ct:\n
wheres.append(\'creation_date <"\' + cf.strftime(\'%Y-%m-%d\') + \'"\')\n
if mf:\n
wheres.append(\'modification_date >"\' + cf.strftime(\'%Y-%m-%d\') + \'"\')\n
if mt:\n
wheres.append(\'modification_date <"\' + cf.strftime(\'%Y-%m-%d\') + \'"\')\n
if wheres != []:\n
args[\'where_expression\'] = \' AND \'.join(wheres)\n
\n
# We search in any language by default\n
if args.get(\'language\') == \'0\': args.pop(\'language\')\n
\n
# User wants only his documents\n
if args.get(\'mine\'): \n
sm = getSecurityManager()\n
u = sm.getUser()\n
args[\'owner\'] = u\n
\n
query_list = []\n
for k, v in args.items():\n
query_list.append(Query(**{k:v}))\n
\n
if args.get(\'newest\'):\n
return ComplexQuery(*query_list, **dict(operator = \'AND\',\n
order_by = \'reference\')) \n
\n
return ComplexQuery(*query_list, **dict(operator = \'AND\')) \n
\n
####################################\n
# NOT SUPPORTED YET VERY WELL\n
\n
#...and now we check for only the newest versions\n
# but we need to preserve order\n
if args.get(\'newest\'):\n
idx = {} # for keeping the last version of every reference\n
# this way we do reduce the number of docs very fast (without calling catalog)\n
newest = [] # for keeping order as it was\n
counter = 0\n
for r in res:\n
ref = r.getReference()\n
try:\n
ver = int(r.getVersion())\n
except ValueError:\n
continue\n
if idx.has_key(ref):\n
if idx[ref][0] >= ver:\n
continue\n
else:\n
del newest[idx[ref][1]]\n
counter -= 1\n
newest.append(r)\n
idx[ref] = (ver, counter)\n
counter += 1\n
# now that we have only one per reference, we can play with languages and revisions\n
res = [doc.getLatestVersionValue() for doc in newest]\n
]]></string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>sstr, **kw</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>sstr</string>
<string>kw</string>
<string>Products.ZSQLCatalog.SQLCatalog</string>
<string>Query</string>
<string>ComplexQuery</string>
<string>None</string>
<string>_getattr_</string>
<string>context</string>
<string>args</string>
<string>query_list</string>
<string>cats</string>
<string>bases</string>
<string>_getiter_</string>
<string>k</string>
<string>v</string>
<string>_write_</string>
<string>mode</string>
<string>modemap</string>
<string>dict</string>
<string>_getitem_</string>
<string>cf</string>
<string>ct</string>
<string>mf</string>
<string>mt</string>
<string>wheres</string>
<string>getSecurityManager</string>
<string>sm</string>
<string>u</string>
<string>_apply_</string>
<string>idx</string>
<string>newest</string>
<string>counter</string>
<string>res</string>
<string>r</string>
<string>ref</string>
<string>int</string>
<string>ver</string>
<string>ValueError</string>
<string>append</string>
<string>$append0</string>
<string>doc</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>SQLCatalog_makeAdvancedSearchQuery</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>from Products.ZSQLCatalog.SQLCatalog import Query\n
from Products.ZSQLCatalog.SQLCatalog import ComplexQuery\n
\n
# Return \n
return ComplexQuery(Query(title=value),\n
Query(reference=value),\n
Query(short_tile=value),\n
Query(source_reference=value),\n
Query(destination_reference=value),\n
operator="OR")\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>value</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>value</string>
<string>Products.ZSQLCatalog.SQLCatalog</string>
<string>Query</string>
<string>ComplexQuery</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>SQLCatalog_makeQuickSearchQuery</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<key_list>
<key>compatibility</key>
<key>email</key>
</key_list>
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment