public abstract class ApplyExprFunction extends AbstractFunction
log, name, spaceParser| Modifier | Constructor and Description |
|---|---|
protected |
ApplyExprFunction(String name) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract Value |
apply(ParseSession session,
org.jsimpledb.parse.func.ApplyExprFunction.ParamInfo params)
Apply this function.
|
Value |
apply(ParseSession session,
Object params)
Evaluate this function.
|
protected Value |
evaluate(ParseSession session,
String variable,
Value value,
Node expr)
Set the variable to the given value and then evaluate the expression.
|
org.jsimpledb.parse.func.ApplyExprFunction.ParamInfo |
parseParams(ParseSession session,
ParseContext ctx,
boolean complete)
Parse function parameters.
|
getHelpDetail, getName, getSessionModes, parseExpressionParams, parseNextParameterclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetHelpSummary, getUsageprotected ApplyExprFunction(String name)
public org.jsimpledb.parse.func.ApplyExprFunction.ParamInfo parseParams(ParseSession session, ParseContext ctx, boolean complete)
Function
The ctx will be pointing at the first parameter (if any) or closing parenthesis. This method should parse
(but not evaluate) function parameters up through the closing parenthesis. The return value is an opaque value
representing the parsed parameters and subsequently passed to apply().
session - parse sessionctx - parse contextcomplete - false if parse is "for real", true if only for tab completion calculationapply()public final Value apply(ParseSession session, Object params)
Functionsession - parse sessionparams - parsed parameters returned by parseParams()protected abstract Value apply(ParseSession session, org.jsimpledb.parse.func.ApplyExprFunction.ParamInfo params)
session - parse sessionparams - function parametersprotected Value evaluate(ParseSession session, String variable, Value value, Node expr)
session - parse sessionvariable - the name of the variable to usevalue - the value to set to the variableexpr - the expression to evaluateCopyright © 2017. All rights reserved.