I’ve not written anything on this, but here is a rough outline.
We can use the ‘from’ keyword to introduce out of working memory data, this can use any valid java statement.
Because we don’t support ‘cut’ you will need to check for the absence of data, before calling ‘from’.
query X when
not Person( name == “Mark” )
Person() from helper.asyncInsert( new Person( “Mark” ) )
end
helper here is a global you set that has a reference to the session and will handle any async work that you need. Here it would just insert the passed object, but it could call out to a DB. It’s up to you to use the JDK to correctly do async operations.
What I don’t like about this is the query may be called too often, it’ll short cut out due to the ‘not’, but still the lack of efficiency annoys me - but may not matter in your case.
Mark