Resolution: The string value of a filter for a string property must be included in double quotes. This is required to avoid misinterpretations by TIBCO ActiveSpaces.
Single quotes do not work when,
1). The string value can be interpreted as a date an exception is thrown.
Example. (tvalue is a string property):
String filter = "tvalue = '1993-09-08'";
Exception thrown in mainSYS_ERROR (bad_operand - invalid query=tvalue = '1993-09-08')
com.tibco.as.space.ASException: SYS_ERROR (bad_operand - invalid query=tvalue = '1993-09-08')
at Native.QueryStmt::verify(QueryStmt.cpp:259)
at Native.SpaceFilter::validate(SpaceFilter.cpp:71)
at Native.SpaceBrowserListener::initialize(SpaceBrowserListener.cpp:59)
at Native.SpaceBrowser::initialize(SpaceBrowser.cpp:42)
at Native.Api_Browser_Initialize(ApiBrowser.cpp:73)
at Native.Api_Browser_Initialize(ApiBrowser.cpp:27)
at Native.Java_com_tibco_as_space_impl_NativeImpl_spaceCreateQueryBrowser(JBrowser.cpp:41)
at com.tibco.as.space.impl.NativeImpl.spaceCreateQueryBrowser(Native Method)
at com.tibco.as.space.impl.ASSpace.browse(ASSpace.java:517)
at ASInit.browser(ASInit.java:129)
at ASInit.main(ASInit.java:162)
Correct filter string:
String filter = "tvalue = \"1993/09/08\"";
2). The string value is a number. Here the query will return no tuples.
Example. (tvalue is a string property):
- Not working (no values returned).
String filter ="tvalue='1'"
- Correct filter string.
String filter ="tvalue=\"1\"";