public interface QueryParameter
literal(String)
and their characters will be escaped
when the Query will executed (i.e. %
, _
and !
characters will get escaped)anyChars()
and anychar()
which correspond
respectively to the %
and _
SQL characters.
#set(xwql = "WHERE doc.fullName LIKE :space AND doc.fullName <> :fullName")
#set ($query = $services.query.xwql(xwql))
#set ($query = $query.bindValue('space').literal($doc.space).literal('.').anyChars().query())
Modifier and Type | Method and Description |
---|---|
QueryParameter |
anychar()
Append a
_ character that will not be escaped. |
QueryParameter |
anyChars()
Append a
% character that will not be escaped. |
QueryParameter |
like(String like) |
QueryParameter |
literal(String literal) |
Query |
query() |
QueryParameter literal(String literal)
literal
- the characters that will get escaped at query execution timeQueryParameter like(String like)
like
- the characters that will get executed as is (i.e no escape will be performed on them) at query
execution timeQueryParameter anychar()
_
character that will not be escaped.QueryParameter anyChars()
%
character that will not be escaped.Query query()
Copyright © 2004–2021 XWiki. All rights reserved.