Presently this set contains the following properties:
SQL session context is implemented as follows: Statements at root connection level use the instance held by the the lcc, nested connections maintain instances of SQLSessionContext, held by the activation of the calling statement. This forms a logical stack as required by the standard. The statement context also holds a reference to the current SQLSessionContext.
When a dynamic result set references e.g. current role, the value retrieved will always be that of the current role when the statement is logically executed (inside procedure/function), not the current value when the result set is accessed outside the stored procedure/function. This works since the nested SQL session context is kept by the caller activation, so even though the statement context of the call has been popped, we can get at the final state of the nested SQL session context since the caller's activation is alive as long as dynamic result sets need it).
If more than one nested connection is used inside a shared procedure, they will share the same nested SQL session context. Since the same dynamic call context is involved, this seems correct.
LanguageConnectionContext#pushNestedSessionContext
| Modifier and Type | Method and Description |
|---|---|
| public HashMap | |
| public String | |
| public SchemaDescriptor | |
| public Boolean | Returns: True is deferred all constraint mode has been
set for this session context.
False is deferred immediate has been set for this
session context.
null means no ALL setting has been made for this contextGet state of DEFERRED ALL setting. |
| public String | |
| public Boolean | Returns: Boolean.TRUE if the constraint mode for this
constraint/index has been set to deferred, Boolean.FALSE if
it has been set to immediate.the constraint id constraintId)Return |
| public void | |
| public void | setConstraintModes(HashMap<UUID, Boolean>
constraint mode map hm)Initialize a inferior session context with the constraint mode map of the parent session context. |
| public void | |
| public void | setDeferred(UUID
The constraint id constraintId, boolean The new constraint mode deferred)Set the constraint mode for this constraint to |
| public void | setDeferredAll(Boolean
the mode to set deferred)Set the constraint mode for all deferrable constraints to
|
| public void | |
| public void |
| getConstraintModes | back to summary |
|---|---|
| public HashMap Get a handle to the session's constraint modes. The caller is responsible for any cloning needed. | |
| getCurrentUser | back to summary |
|---|---|
| public String getCurrentUser() Get the SQL current user of this SQL connection context | |
| getDefaultSchema | back to summary |
|---|---|
| public SchemaDescriptor getDefaultSchema() Get the schema of this SQL connection context | |
| getDeferredAll | back to summary |
|---|---|
| public Boolean getDeferredAll() Get state of DEFERRED ALL setting.
| |
| getRole | back to summary |
|---|---|
| public String getRole() Get the SQL role of this SQL connection context | |
| isDeferred | back to summary |
|---|---|
| public Boolean isDeferred(UUID constraintId) Return | |
| resetConstraintModes | back to summary |
|---|---|
| public void resetConstraintModes() Clear deferred information for this transaction. | |
| setConstraintModes | back to summary |
|---|---|
| public void setConstraintModes(HashMap<UUID, Boolean> hm) Initialize a inferior session context with the constraint mode map of the parent session context. | |
| setDefaultSchema | back to summary |
|---|---|
| public void setDefaultSchema(SchemaDescriptor sd) Set the schema of this SQL connection context | |
| setDeferred | back to summary |
|---|---|
| public void setDeferred(UUID constraintId, boolean deferred) Set the constraint mode for this constraint to
| |
| setDeferredAll | back to summary |
|---|---|
| public void setDeferredAll(Boolean deferred) Set the constraint mode for all deferrable constraints to
| |
| setRole | back to summary |
|---|---|
| public void setRole(String role) Set the SQL role of this SQL connection context | |
| setUser | back to summary |
|---|---|
| public void setUser(String user) Set the SQL current user of this SQL connection context | |