':param batch_type: (optional) One of batch type values available through BatchType enum
:type batch_type: str or None
:param timestamp: (optional) A datetime or timedelta object with desired timestamp to be applied
to the batch conditional.
:type timestamp: datetime or timedelta or None
:param consistency: (optional) One of consistency values ("ANY", "ONE", "QUORUM" etc)
:type consistency: The :class:`.ConsistencyLevel` to be used for the batch query, or None.
:param execute_on_exception: (Defaults to False) Indicates that when the BatchQuery instance is used
as a context manager the queries accumulated within the context must be executed despite
encountering an error within the context. By default, any exception raised from within
the context scope will cause the batched queries not to be executed.
:type execute_on_exception: bool
:param timeout: (optional) Timeout for the entire batch (in seconds), if not specified fallback
to default session timeout
:type timeout: float or None
:param str connection: Connection name to use for the batch execution'

def __init__(self, batch_type=None, timestamp=None, consistency=None, execute_on_exception=False, timeout=conn.NOT_SET, connection=None):

    self.queries = []
    self.batch_type = batch_type
    if ((timestamp is not None) and (not isinstance(timestamp, (datetime, timedelta)))):
        raise CQLEngineException('timestamp    object    must    be    an    instance    of    datetime')
    self.timestamp = timestamp
    self._consistency = consistency
    self._execute_on_exception = execute_on_exception
    self._timeout = timeout
    self._callbacks = []
    self._executed = False
    self._context_entered = False
    self._connection = connection
    if connection:
        self._connection_explicit = True
