Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
42c7a945
Commit
42c7a945
authored
Sep 17, 2001
by
Amos Latteier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clarified nb versus string
parent
7611b0c2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
13 deletions
+15
-13
lib/python/Products/OFSP/help/dtml-sqlgroup.stx
lib/python/Products/OFSP/help/dtml-sqlgroup.stx
+6
-6
lib/python/Products/OFSP/help/dtml-sqltest.stx
lib/python/Products/OFSP/help/dtml-sqltest.stx
+5
-4
lib/python/Products/OFSP/help/dtml-sqlvar.stx
lib/python/Products/OFSP/help/dtml-sqlvar.stx
+4
-3
No files found.
lib/python/Products/OFSP/help/dtml-sqlgroup.stx
View file @
42c7a945
...
...
@@ -34,11 +34,11 @@ sqlgroup: Formats complex SQL expressions
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 @@ sqlgroup: Formats complex SQL expressions
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::
...
...
lib/python/Products/OFSP/help/dtml-sqltest.stx
View file @
42c7a945
...
...
@@ -18,9 +18,10 @@ sqltest: Formats SQL condition tests
Attributes
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 @@ sqltest: Formats SQL condition tests
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::
...
...
lib/python/Products/OFSP/help/dtml-sqlvar.stx
View file @
42c7a945
...
...
@@ -16,8 +16,9 @@ sqlvar: Inserts SQL variables
Attributes
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 @@ sqlvar: Inserts SQL variables
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.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment