groovy.0-base.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of deephaven-engine-table Show documentation
Show all versions of deephaven-engine-table Show documentation
Engine Table: Implementation and closely-coupled utilities
__QUERY_NAME__="core"
scriptImportClass = {c -> __groovySession.addScriptImportClass(c)}
scriptImportStatic = {c -> __groovySession.addScriptImportStatic(c)}
isValidVariableName = {name -> name.matches("^[a-zA-Z_][a-zA-Z_0-9]*")}
publishVariable = { String name, value ->
if(!isValidVariableName(name)){
throw new RuntimeException("publishVariable: Attempting to publish an invalid variable name: " + name)
}
binding.setVariable(name, value)
}
removeVariable = {name ->
if(!isValidVariableName(name)){
throw new RuntimeException("removeVariable: Attempting to remove an invalid variable name: " + name)
}
binding.variables.remove(name)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy