class DefaultSession
A class that contains and manages connections to DSE. It allows for executing or preparing queries for execution.
Implements
Methods
Execute a query.
Available execution options:
| Option Name | Option Type | Option Details |
|---|---|---|
| arguments | array | An array or positional or named arguments |
| consistency | int | A consistency constant e.g Dse::CONSISTENCY_ONE, Dse::CONSISTENCY_QUORUM, etc.
|
| timeout | int | A number of rows to include in result for paging |
| paging_state_token | string | A string token use to resume from the state of a previous result set |
| retry_policy |
Dse\RetryPolicy
|
A retry policy that is used to handle server-side failures for this request |
| serial_consistency | int | Either Dse::CONSISTENCY_SERIAL or Dse::CONSISTENCY_LOCAL_SERIAL
|
| timestamp | int|string | Either an integer or integer string timestamp that represents the number of microseconds since the epoch |
| execute_as | string | User to execute statement as |
Execute a query asynchronously. This method returns immediately, but the query continues execution in the background.
Prepare a query for execution.
Asynchronously prepare a query for execution.
null close
(double $timeout )
Close the session and all its connections.
Dse\FutureClose closeAsync
( )Asynchronously close the session and all its connections.
Dse\Schema schema
( )Get a snapshot of the cluster’s current schema.
Execute graph queries.
Available execution options:
| Option Name | Option Type | Option Details |
|---|---|---|
| graph_language | string |
Dse\Graph language; default “gremlin-groovy”
|
| graph_source | string |
Dse\Graph source; default “g”. If running analytics (OLAP) query then it should use “a”
|
| graph_name | string |
Dse\Graph name
|
| read_consistency | consistency | Read consistency of graph queries; default Dse::CONSISTENCY_ONE
|
| write_consistency | consistency | Write consistency of graph queries; default Dse::CONSISTENCY_QUORUM
|
| request_timeout | double|int | Request time of graph queries in seconds; default 0 (no timeout)
|
| timestamp | int|string | Either an integer or integer string timestamp that represents the number of microseconds since the epoch |
Asynchronously execute a graph query.