Class HashOfQueryFunction
java.lang.Object
ch.tocco.nice2.persist.core.impl.entity.HashOfQueryFunction
- All Implemented Interfaces:
QueryFunction
This query function makes it possible to use binaries in queries.
It simply substitutes the type binary
with string
for each
PathNode
since the binary is represented by its hash sum.
Usage:
find SomeEntity where hashOf('binary_data') == string:"hash1234"
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetName()
The unique function name.@Nullable Node
postCompile
(Cursor cursor, FuncallNode functionRoot, EntityModel entityModel) Applies this function to the given (sub)tree.
-
Constructor Details
-
HashOfQueryFunction
-
-
Method Details
-
getName
Description copied from interface:QueryFunction
The unique function name.- Specified by:
getName
in interfaceQueryFunction
-
postCompile
@Nullable public @Nullable Node postCompile(Cursor cursor, FuncallNode functionRoot, EntityModel entityModel) throws Exception Description copied from interface:QueryFunction
Applies this function to the given (sub)tree.- Specified by:
postCompile
in interfaceQueryFunction
- Throws:
Exception
-