[Zope-Checkins] CVS: Zope/lib/python/Products/OFSP/help - dtml-sqlgroup.stx:1.3.36.1 dtml-sqltest.stx:1.2.36.1 dtml-sqlvar.stx:1.3.36.1
Amos Latteier
amos@zope.com
Mon, 17 Sep 2001 18:06:10 -0400
Update of /cvs-repository/Zope/lib/python/Products/OFSP/help
In directory cvs.zope.org:/tmp/cvs-serv24683
Modified Files:
Tag: Zope-2_4-branch
dtml-sqlgroup.stx dtml-sqltest.stx dtml-sqlvar.stx
Log Message:
merged dtml docs nb versus string changes to 2.4 branch
=== Zope/lib/python/Products/OFSP/help/dtml-sqlgroup.stx 1.3 => 1.3.36.1 ===
select * from employees
<dtml-sqlgroup where>
- <dtml-sqltest salary op=gt type=float optional>
+ <dtml-sqltest salary op="gt" type="float" optional>
<dtml-and>
- <dtml-sqltest first op=eq type=string multiple optional>
+ <dtml-sqltest first type="nb" multiple optional>
<dtml-and>
- <dtml-sqltest last op=eq type=string multiple optional>
+ <dtml-sqltest last type="nb" multiple optional>
</dtml-sqlgroup>
If 'first' is 'Bob' and 'last' is 'Smith, McDonald' it renders::
@@ -64,12 +64,12 @@
select * from employees
<dtml-sqlgroup where>
<dtml-sqlgroup>
- <dtml-sqltest first op=like type=string>
+ <dtml-sqltest first op="like" type="nb">
<dtml-and>
- <dtml-sqltest last op=like type=string>
+ <dtml-sqltest last op="like" type="nb">
<dtml-sqlgroup>
<dtml-or>
- <dtml-sqltest salary op=gt type=float>
+ <dtml-sqltest salary op="gt" type="float">
</dtml-sqlgroup>
Given sample arguments, this template renders to SQL like so::
=== Zope/lib/python/Products/OFSP/help/dtml-sqltest.stx 1.2 => 1.2.36.1 ===
type=string -- The type of the variable. Valid types include:
- 'string', 'int', 'float' and 'nb'. 'nb' means non-blank
- string. The type attribute is required and is used to properly
- escape inserted variable.
+ 'string', 'int', 'float' and 'nb'. 'nb' means non-blank string,
+ and should be used instead of 'string' unless you want to test for
+ blank values. The type attribute is required and is used to
+ properly escape inserted variable.
column=string -- The name of the SQL column to test against. This
attribute defaults to the variable name.
@@ -54,7 +55,7 @@
Basic usage::
select * from employees
- where <dtml-sqltest name type="string">
+ where <dtml-sqltest name type="nb">
If the 'name' variable is 'Bob' then this renders::
=== Zope/lib/python/Products/OFSP/help/dtml-sqlvar.stx 1.3 => 1.3.36.1 ===
type=string -- The type of the variable. Valid types include:
- 'string', 'int', 'float' and 'nb'. 'nb' means non-blank
- string. The type attribute is required and is used to properly
+ 'string', 'int', 'float' and 'nb'. 'nb' means non-blank string and
+ should be used in place of 'string' unless you want to use blank
+ strings. The type attribute is required and is used to properly
escape inserted variable.
optional=boolean -- If true and the variable is null or
@@ -28,7 +29,7 @@
Basic usage::
select * from employees
- where name=<dtml-sqlvar name type="string">
+ where name=<dtml-sqlvar name type="nb">
This SQL quotes the 'name' string variable.