public class OQLQuery
extends java.lang.Object
Note: This engine utilizes a two-tier soft-reference cache to maximize throughput:
SQLQuery is cached.$1), the parsed AST (OQLQuery) is cached,
allowing subsequent calls to rapidly generate new SQLQuery objects with different arguments
without re-parsing the grammar.Usage:
SQLQuery sqlQuery = OQLQuery.compile(schema, "select a from BO a", args);
| Constructor and Description |
|---|
OQLQuery(SchemaI schema,
java.lang.String queryString)
Parses a raw OQL string into an internal Abstract Syntax Tree (AST).
|
| Modifier and Type | Method and Description |
|---|---|
static SQLQuery |
compile(SchemaI schema,
java.lang.String queryString,
java.lang.Object[] oqlArgs)
Compiles an OQL string into a fully executable JDBC SQL query, utilizing the memory-sensitive cache.
|
int |
getExpectedRows(java.lang.Object[] oqlArgs) |
static int |
getExpectedRows(QueryExpressionNode parsedTree,
java.lang.Object[] oqlArgs)
Attempts to heuristically determine the expected row count from the AST nodes.
|
QueryExpressionNode |
getParsedTree() |
SchemaI |
getSchema() |
public OQLQuery(SchemaI schema, java.lang.String queryString) throws OQLException
schema - the schema definition used for type resolutionqueryString - the raw OQL string to parseOQLException - if the syntax is invalid or type resolution failspublic static SQLQuery compile(SchemaI schema, java.lang.String queryString, java.lang.Object[] oqlArgs) throws OQLException
schema - the schema definitionqueryString - the raw OQL stringoqlArgs - the positional arguments mapped to the OQL variablesOQLExceptionpublic SchemaI getSchema()
public QueryExpressionNode getParsedTree()
public int getExpectedRows(java.lang.Object[] oqlArgs)
public static int getExpectedRows(QueryExpressionNode parsedTree, java.lang.Object[] oqlArgs)
SQLQuery.NO_LIMIT if statically indeterminateCopyright © 2000-2026 OAshi S.à r.l. All Rights Reserved.