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
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetName()The unique function name.@Nullable NodepostCompile(Cursor cursor, FuncallNode functionRoot, EntityModel entityModel) Applies this function to the given (sub)tree.
-
Constructor Details
-
HashOfQueryFunction
-
-
Method Details
-
getName
Description copied from interface:QueryFunctionThe unique function name.- Specified by:
getNamein interfaceQueryFunction
-
postCompile
@Nullable public @Nullable Node postCompile(Cursor cursor, FuncallNode functionRoot, EntityModel entityModel) throws Exception Description copied from interface:QueryFunctionApplies this function to the given (sub)tree.- Specified by:
postCompilein interfaceQueryFunction- Throws:
Exception
-