Package org.basex.query.scope
Class MainModule
java.lang.Object
org.basex.query.expr.ExprInfo
org.basex.query.scope.StaticScope
org.basex.query.scope.AModule
org.basex.query.scope.MainModule
- All Implemented Interfaces:
Scope
An XQuery main module.
- Author:
- BaseX Team 2005-21, BSD License, Leo Woerteler
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionMainModule(VarScope vs, Expr expr, SeqType declType, String doc, InputInfo info, TokenObjMap<StaticFunc> funcs, TokenObjMap<StaticVar> vars, TokenSet imports) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidcomp(CompileContext cc) Compiles the expression contained in this scope.booleandatabases(Locks locks, QueryContext qc) Adds the names of the databases that may be touched by the module.static MainModuleget(StaticFunc sf, Expr[] args) Creates a new main module for the specified function.static MainModuleCreates a new main module for a context item declared in the prolog.iter(QueryContext qc) Creates a result iterator which lazily evaluates this module.voidCreates a query plan.voidplan(QueryString qs) Creates a query string.value(QueryContext qc) Creates the result.booleanvisit(ASTVisitor visitor) Traverses this scope with the givenASTVisitor.Methods inherited from class org.basex.query.scope.StaticScope
compiled, docMethods inherited from class org.basex.query.expr.ExprInfo
description, toErrorString, toString
-
Constructor Details
-
MainModule
public MainModule(VarScope vs, Expr expr, SeqType declType, String doc, InputInfo info, TokenObjMap<StaticFunc> funcs, TokenObjMap<StaticVar> vars, TokenSet imports) Constructor.- Parameters:
vs- variable scopeexpr- root expressiondeclType- optional type (can benull)doc- documentation (can benull)info- input info (can benull)funcs- user-defined functions (can benull)vars- static variables (can benull)imports- namespace URIs of imported modules (can benull)
-
-
Method Details
-
get
Creates a new main module for a context item declared in the prolog.- Parameters:
vs- variable scopeexpr- root expressiondeclType- declared type (can benull)doc- documentation (can benull)ii- input info (can benull)- Returns:
- main module
-
get
Creates a new main module for the specified function.- Parameters:
sf- user-defined functionargs- arguments- Returns:
- main module
- Throws:
QueryException- query exception
-
comp
Description copied from interface:ScopeCompiles the expression contained in this scope.- Parameters:
cc- compilation context- Throws:
QueryException- compilation errors
-
iter
Creates a result iterator which lazily evaluates this module.- Parameters:
qc- query context- Returns:
- result iterator
- Throws:
QueryException- query exception
-
value
Creates the result.- Parameters:
qc- query context- Returns:
- result
- Throws:
QueryException- query exception
-
databases
Adds the names of the databases that may be touched by the module.- Parameters:
locks- lock resultqc- query context- Returns:
- result of check
-
visit
Description copied from interface:ScopeTraverses this scope with the givenASTVisitor.- Parameters:
visitor- visitor- Returns:
- continue flag
-
plan
Description copied from class:ExprInfoCreates a query plan. -
plan
Description copied from class:ExprInfoCreates a query string.
-