Class Factory
java.lang.Object
org.apache.derby.iapi.db.Factory
Callers of these methods must be within the context of a
Derby statement execution otherwise a SQLException will be thrown.
There are two basic ways to call these methods.
-
Within a SQL statement.
-- checkpoint the database CALL org.apache.derby.iapi.db.Factory:: getDatabaseOfConnection().checkpoint(); -
In a server-side JDBC method.
import org.apache.derby.iapi.db.*; ... // checkpoint the database Database db = Factory.getDatabaseOfConnection(); db.checkpoint();
This class can be accessed using the class alias FACTORY in SQL-J statements.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DatabaseReturns the Database object associated with the current connection.static TriggerExecutionContextGet the TriggerExecutionContext for the current connection of the connection.
-
Constructor Details
-
Factory
public Factory()
-
-
Method Details
-
getDatabaseOfConnection
Returns the Database object associated with the current connection.
- Throws:
SQLException- Not in a connection context.
-
getTriggerExecutionContext
Get the TriggerExecutionContext for the current connection of the connection.- Returns:
- the TriggerExecutionContext if called from the context of a trigger; otherwise, null.
- Throws:
SQLException- Not in a connection or trigger context.
-