Cassandra v1.0.0-rc.2 Cassandra.Session View Source

Link to this section Summary

Link to this section Functions

Link to this function execute(pool, query, options \\ []) View Source
Link to this function run_stream(pool, query, func, options \\ []) View Source

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)
Link to this function start_link(cluster, options \\ []) View Source