pyqldb.communication.session_client.
SessionClient
(ledger_name, token, client, session_id)[source]¶A class representing an independent session to a QLDB ledger that handles endpoint requests. This class is used in
pyqldb.driver.base_qldb_driver.BaseQldbDriver
and pyqldb.session.qldb_session.QldbSession
.
This class is not meant to be used directly by developers.
ledger_name (str) – The QLDB ledger name.
token (str) – The initial session token representing the session connection.
The low level service client.
The session ID.
abort_transaction
()[source]¶Send request to abort the currently active transaction.
dict
The abort transaction result response from the endpoint.
client
¶The read-only low level service client.
commit_transaction
(transaction_id, commit_digest)[source]¶Send request to commit the currently active transaction.
transaction_id (str) – The ID of the transaction.
commit_digest (str) – The digest hash of the transaction to commit.
dict
The commit transaction result response from the endpoint.
end_session
()[source]¶Send request to end the independent session represented by the instance of this class.
dict
The end session result response from the endpoint.
execute_statement
(transaction_id, statement, parameters)[source]¶Send an execute request with parameters to QLDB.
transaction_id (str) – The ID of the transaction.
statement (str) – The statement to execute.
parameters (list) – List of Ion values to fill in parameters of the statement.
dict
The statement result response from the endpoint.
fetch_page
(transaction_id, next_page_token)[source]¶Send fetch result request to QLDB, retrieving the next chunk of data for the result.
transaction_id (str) – The ID of the transaction.
next_page_token (str) – The next page token.
dict
The fetch result response from the endpoint.
id
¶The read-only ID of this session.
ledger_name
¶The read-only ledger name.
start_session
(ledger_name, client)[source]¶Factory method for constructing a new pyqldb.communication.session_client.SessionClient
, creating a
new session to QLDB on construction.
ledger_name (str) – The ledger name to create session.
client (botocore.client.BaseClient
) – The low level service client.
A new SessionClient object.
start_transaction
()[source]¶Send request to start a transaction.
dict
The start transaction response.
token
¶The read-only token.