public class OStatementCache extends Object
Constructor and Description |
---|
OStatementCache(int size) |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
boolean |
contains(String statement) |
OStatement |
get(String statement) |
static OStatement |
get(String statement,
ODatabaseDocumentInternal db)
returns an already parsed SQL executor, taking it from the cache if it exists or creating a new
one (parsing and then putting it into the cache) if it doesn't
|
protected static OStatement |
parse(String statement)
parses an SQL statement and returns the corresponding executor
|
protected static void |
throwParsingException(ParseException e,
String statement) |
protected static void |
throwParsingException(TokenMgrError e,
String statement) |
public OStatementCache(int size)
size
- the size of the cachepublic boolean contains(String statement)
statement
- an SQL statementpublic static OStatement get(String statement, ODatabaseDocumentInternal db)
statement
- the SQL statementdb
- the current DB instance. If null, cache is ignored and a new executor is created
through statement parsingpublic OStatement get(String statement)
statement
- an SQL statementprotected static OStatement parse(String statement) throws OCommandSQLParsingException
statement
- the SQL statementOCommandSQLParsingException
- if the input parameter is not a valid SQL statementprotected static void throwParsingException(ParseException e, String statement)
protected static void throwParsingException(TokenMgrError e, String statement)
public void clear()
Copyright © 2009–2020 OrientDB. All rights reserved.