defmodule Exandra.Batch do
  @moduledoc """
  A struct that represents a batch of queries to be executed in a single
  request to Cassandra/Scylla.

  This is essentially a wrapper around `Xandra.Batch`, but you should not
  use `Xandra.Batch` if working with Exandra.

  `Exandra.Batch` contains a single field, `:queries`, which is a list of
  tuples in the form `{query, params}`.

  ## Usage

  To execute a batch of queries through Exandra, you can use the

      batch = %Exandra.Batch{
        queries: [
          {"INSERT INTO users (email) VALUES (?)", [""]},
          {"INSERT INTO users (email) VALUES (?)", [""]}

      Exandra.execute_batch(MyApp.Repo, batch)


  @enforce_keys [:queries]
  defstruct [:queries]