| Modifier and Type | Field and Description |
|---|---|
| private Command | |
| protected boolean | create
Whether to create a new object (for indexes). |
| private long | |
| private long | |
| protected ArrayList | parameters
The list of parameters. |
| private int | persistedObjectId
Used to preserve object identities on database startup. |
| protected boolean | prepareAlways
If the query should be prepared before each execution. |
| private int | |
| protected SessionLocal | session
The session. |
| protected String | sqlStatement
The SQL string. |
| protected ArrayList | sqlTokens
The SQL tokens. |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| protected void | |
| public void | collectDependencies(HashSet<DbObject>
collection of dependencies to populate dependencies)Find and collect all DbObjects, this Prepared depends on. |
| public long | |
| protected final Database | |
| pack-priv long | Returns: the meta data modification idGet the meta data modification id of the database when this statement was compiled. |
| protected int | |
| public ArrayList | |
| public int | Returns: the object id or 0 if not setGet the object id to use for the database object that is created in this statement. |
| public final String | Returns: the execution planformatting flags sqlFlags)Get the SQL statement with the execution plan. |
| public StringBuilder | Returns: the execution planstring builder builder, int formatting flags sqlFlags)Appends the SQL statement with the execution plan. |
| public final SessionLocal | |
| public static String | Returns: the SQL snippetthe expression list list)Get the SQL snippet of the expression list. |
| public final String | |
| public final ArrayList | |
| public abstract int | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | Returns: is this command can be repeated again on locking failureReturns is this command can be repeated again on locking failure. |
| public abstract boolean | |
| public boolean | Returns: are values of parameters were specified in SQLReturns whether values of parameters were specified in SQL. |
| public boolean | |
| public void | |
| public ResultInterface | |
| public abstract ResultInterface | |
| public void | |
| public void | |
| pack-priv void | |
| public void | setParameterList(ArrayList<Parameter>
the parameter list parameters)Set the parameter list of this statement. |
| public void | |
| public void | |
| private void | |
| protected final DbException | Returns: the exceptionthe exception e, long the row number rowId, String the values of the row values)Set the SQL statement of the exception to the given row. |
| public void | |
| public final void | |
| public void | setWithParamValues(boolean
are values of parameters were specified in SQL withParamValues)Sets whether values of parameters were specified in SQL. |
| public String | Returns: the SQL statementOverrides java. Convert the statement to a String. |
| pack-priv void | |
| public long |
| command | back to summary |
|---|---|
| private Command command | |
| create | back to summary |
|---|---|
| protected boolean create Whether to create a new object (for indexes). | |
| currentRowNumber | back to summary |
|---|---|
| private long currentRowNumber | |
| modificationMetaId | back to summary |
|---|---|
| private long modificationMetaId | |
| parameters | back to summary |
|---|---|
| protected ArrayList<Parameter> parameters The list of parameters. | |
| persistedObjectId | back to summary |
|---|---|
| private int persistedObjectId Used to preserve object identities on database startup. | |
| prepareAlways | back to summary |
|---|---|
| protected boolean prepareAlways If the query should be prepared before each execution. This is set for queries with LIKE ?, because the query plan depends on the parameter value. | |
| rowScanCount | back to summary |
|---|---|
| private int rowScanCount | |
| session | back to summary |
|---|---|
| protected SessionLocal session The session. | |
| sqlStatement | back to summary |
|---|---|
| protected String sqlStatement The SQL string. | |
| sqlTokens | back to summary |
|---|---|
| protected ArrayList<Token> sqlTokens The SQL tokens. | |
| withParamValues | back to summary |
|---|---|
| private boolean withParamValues | |
| Prepared | back to summary |
|---|---|
| public Prepared(SessionLocal session) Create a new object.
| |
| checkCanceled | back to summary |
|---|---|
| public void checkCanceled() Check if this statement was canceled.
| |
| checkParameters | back to summary |
|---|---|
| protected void checkParameters() Check if all parameters have been set.
| |
| collectDependencies | back to summary |
|---|---|
| public void collectDependencies(HashSet<DbObject> dependencies) Find and collect all DbObjects, this Prepared depends on. | |
| getCurrentRowNumber | back to summary |
|---|---|
| public long getCurrentRowNumber() Get the current row number.
| |
| getDatabase | back to summary |
|---|---|
| protected final Database getDatabase() | |
| getModificationMetaId | back to summary |
|---|---|
| pack-priv long getModificationMetaId() Get the meta data modification id of the database when this statement was compiled.
| |
| getObjectId | back to summary |
|---|---|
| protected int getObjectId() Get the current object id, or get a new id from the database. The object id is used when creating new database object (CREATE statement). This method may be called only once.
| |
| getParameters | back to summary |
|---|---|
| public ArrayList Get the parameter list. | |
| getPersistedObjectId | back to summary |
|---|---|
| public int getPersistedObjectId() Get the object id to use for the database object that is created in this statement. This id is only set when the object is already persisted. If not set, this method returns 0.
| |
| getPlanSQL | back to summary |
|---|---|
| public final String getPlanSQL(int sqlFlags) Get the SQL statement with the execution plan.
| |
| getPlanSQL | back to summary |
|---|---|
| public StringBuilder getPlanSQL(StringBuilder builder, int sqlFlags) Appends the SQL statement with the execution plan.
| |
| getSession | back to summary |
|---|---|
| public final SessionLocal getSession() | |
| getSimpleSQL | back to summary |
|---|---|
| public static String getSimpleSQL(Expression[] list) Get the SQL snippet of the expression list.
| |
| getSQL | back to summary |
|---|---|
| public final String getSQL() Get the SQL statement.
| |
| getSQLTokens | back to summary |
|---|---|
| public final ArrayList Get the SQL tokens. | |
| getType | back to summary |
|---|---|
| public abstract int getType() Get the command type as defined in CommandInterface
| |
| isCacheable | back to summary |
|---|---|
| public boolean isCacheable() | |
| isQuery | back to summary |
|---|---|
| public boolean isQuery() Check if this object is a query.
| |
| isReadOnly | back to summary |
|---|---|
| public boolean isReadOnly() Check if this command is read only.
| |
| isRetryable | back to summary |
|---|---|
| public boolean isRetryable() Returns is this command can be repeated again on locking failure.
| |
| isTransactional | back to summary |
|---|---|
| public abstract boolean isTransactional() Check if this command is transactional. If it is not, then it forces the current transaction to commit.
| |
| isWithParamValues | back to summary |
|---|---|
| public boolean isWithParamValues() Returns whether values of parameters were specified in SQL.
| |
| needRecompile | back to summary |
|---|---|
| public boolean needRecompile() Check if the statement needs to be re-compiled.
| |
| prepare | back to summary |
|---|---|
| public void prepare() Prepare this statement. | |
| query | back to summary |
|---|---|
| public ResultInterface query(long maxrows) Execute the query.
| |
| queryMeta | back to summary |
|---|---|
| public abstract ResultInterface queryMeta() Get an empty result set containing the meta data.
| |
| setCommand | back to summary |
|---|---|
| public void setCommand(Command command) Set the command.
| |
| setCurrentRowNumber | back to summary |
|---|---|
| public void setCurrentRowNumber(long rowNumber) Set the current row number.
| |
| setModificationMetaId | back to summary |
|---|---|
| pack-priv void setModificationMetaId(long id) Set the meta data modification id of this statement.
| |
| setParameterList | back to summary |
|---|---|
| public void setParameterList(ArrayList<Parameter> parameters) Set the parameter list of this statement. | |
| setPersistedObjectId | back to summary |
|---|---|
| public void setPersistedObjectId(int i) Set the persisted object id for this statement.
| |
| setPrepareAlways | back to summary |
|---|---|
| public void setPrepareAlways(boolean prepareAlways) Set the prepare always flag. If set, the statement is re-compiled whenever it is executed.
| |
| setProgress | back to summary |
|---|---|
| private void setProgress() Notifies query progress via the DatabaseEventListener | |
| setRow | back to summary |
|---|---|
| protected final DbException setRow(DbException e, long rowId, String values) Set the SQL statement of the exception to the given row.
| |
| setSession | back to summary |
|---|---|
| public void setSession(SessionLocal currentSession) Set the session for this statement.
| |
| setSQL | back to summary |
|---|---|
| public final void setSQL(String sql, ArrayList<Token> sqlTokens) Set the SQL statement. | |
| setWithParamValues | back to summary |
|---|---|
| public void setWithParamValues(boolean withParamValues) Sets whether values of parameters were specified in SQL.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Convert the statement to a String. | |
| trace | back to summary |
|---|---|
| pack-priv void trace(Database database, long startTimeNanos, long rowCount) Print information about the statement executed if info trace level is enabled.
| |
| update | back to summary |
|---|---|
| public long update() Execute the statement.
| |