Cassandra v1.0.1 Cassandra.Session View Source
Link to this section Summary
Functions
Returns a specification to start this module under a supervisor
Callback invoked to start the supervisor and during hot code upgrades
Executes a query and streams chunks of the results
Link to this section Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
Callback invoked to start the supervisor and during hot code upgrades.
Developers typically invoke Supervisor.init/2
at the end of their
init callback to return the proper supervision flags.
Callback implementation for Supervisor.init/1
.
Executes a query and streams chunks of the results.
func
must be a function of arity one which receives the stream as parameter.
Options
:page_size
- number of rows in each chunk (Cassandra recommends against using values below 100)
Example
Session.run_stream(session, "SELECT name, age FROM users;", &Enum.to_list/1, page_size: 2)