Class User.SQLForSome Extends %Persistent {
Property Name As %String;
Property Domains As list Of %String;
Index Domains On Domains(ELEMENTS) [ Type = bitmap ];
Query TestQuery(Favorites As %List) As %SQLQuery(ROWSPEC = "Name:%String") {
SELECT Name
FROM SQLForSome
WHERE FOR SOME %ELEMENT(Domains)(%VALUE %INLIST :Favorites)
}
// Broken when table alias used. Still will save/compile though
Query TestQueryBroken(Favorites As %List) As %SQLQuery(ROWSPEC = "Name:%String") {
SELECT foo.Name
FROM SQLForSome foo
WHERE FOR SOME %ELEMENT(foo.Domains)(%VALUE %INLIST :Favorites)
}
Storage Default
{
<Data name="SQLForSomeDefaultData">
<Value name="1">
<Value>%%CLASSNAME</Value>
</Value>
<Value name="2">
<Value>Domains</Value>
</Value>
<Value name="3">
<Value>Name</Value>
</Value>
</Data>
<DataLocation>^User.SQLForSomeD</DataLocation>
<DefaultData>SQLForSomeDefaultData</DefaultData>
<IdLocation>^User.SQLForSomeD</IdLocation>
<IndexLocation>^User.SQLForSomeI</IndexLocation>
<StreamLocation>^User.SQLForSomeS</StreamLocation>
<Type>%Library.CacheStorage</Type>
}
}
This is a bug in my ANTLR grammar for ISC SQL.
I will fix on Tuesday and get back to you.
Would you mind attaching the code from above image, so I don't have to retype.
Thanks,
Jonathan Levinson
Here you go - this will compile in USER namespace
The fix to this SQL problem will be in next available build.