Commit b49dedae authored by Sebastien Robin's avatar Sebastien Robin

use ranges


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@3288 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent efbac2ac
...@@ -13,8 +13,11 @@ predicate_property_dict</params> ...@@ -13,8 +13,11 @@ predicate_property_dict</params>
<dtml-if isPredicate> <dtml-if isPredicate>
INSERT INTO predicate VALUES ( INSERT INTO predicate VALUES (
<dtml-sqlvar uid type="int">, <dtml-sqlvar uid type="int">,
<dtml-if expr="predicate_property_dict.has_key('quantity')"><dtml-sqlvar expr="predicate_property_dict['quantity']" type="float"><dtml-else>NULL</dtml-if>, <dtml-sqlvar expr="predicate_property_dict.get('quantity', None)" type="float" optional>,
<dtml-if expr="predicate_property_dict.has_key('quantity_min')"><dtml-sqlvar expr="predicate_property_dict['quantity_min']" type="float"><dtml-else>NULL</dtml-if>, <dtml-sqlvar expr="predicate_property_dict.get('quantity_range_min', None)" type="float" optional>,
<dtml-if expr="predicate_property_dict.has_key('quantity_max')"><dtml-sqlvar expr="predicate_property_dict['quantity_max']" type="float"><dtml-else>NULL</dtml-if> <dtml-sqlvar expr="predicate_property_dict.get('quantity_range_max', None)" type="float" optional>,
<dtml-sqlvar expr="predicate_property_dict.get('start_date', None)" type="datetime" optional>,
<dtml-sqlvar expr="predicate_property_dict.get('start_date_range_min', None)" type="datetime" optional>,
<dtml-sqlvar expr="predicate_property_dict.get('start_date_range_max', None)" type="datetime" optional>
); );
</dtml-if> </dtml-if>
...@@ -11,7 +11,10 @@ class_file: ...@@ -11,7 +11,10 @@ class_file:
CREATE TABLE predicate ( CREATE TABLE predicate (
uid BIGINT UNSIGNED NOT NULL, uid BIGINT UNSIGNED NOT NULL,
`quantity` real , `quantity` real ,
`quantity_min` real , `quantity_range_min` real ,
`quantity_max` real , `quantity_range_max` real ,
`start_date` datetime ,
`start_date_range_min` datetime ,
`start_date_range_max` datetime ,
KEY `uid` (`uid`) KEY `uid` (`uid`)
) TYPE=InnoDB; ) TYPE=InnoDB;
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