'Test to verify the execution of BaseCQLStatements using connection.execute
@since 3.10
@jira_ticket PYTHON-505
@expected_result inserts a row in C*, updates the rows and then deletes
all the rows using BaseCQLStatements
@test_category data_types:object_mapper'

def test_insert_statement_execute(self):

    partition = uuid4()
    cluster = 1
    st = InsertStatement(self.table_name)
    st.add_assignment(Column(db_field='partition'), partition)
    st.add_assignment(Column(db_field='cluster'), cluster)
    st.add_assignment(Column(db_field='count'), 1)
    st.add_assignment(Column(db_field='text'), 'text_for_db')
    st.add_assignment(Column(db_field='text_set'), set(('foo', 'bar')))
    st.add_assignment(Column(db_field='text_list'), ['foo', 'bar'])
    st.add_assignment(Column(db_field='text_map'), {'foo': '1', 'bar': '2'})
    execute(st)
    self._verify_statement(st)
    where = [WhereClause('partition', EqualsOperator(), partition), WhereClause('cluster', EqualsOperator(), cluster)]
    st = UpdateStatement(self.table_name, where=where)
    st.add_assignment(Column(db_field='count'), 2)
    st.add_assignment(Column(db_field='text'), 'text_for_db_update')
    st.add_assignment(Column(db_field='text_set'), set(('foo_update', 'bar_update')))
    st.add_assignment(Column(db_field='text_list'), ['foo_update', 'bar_update'])
    st.add_assignment(Column(db_field='text_map'), {'foo': '3', 'bar': '4'})
    execute(st)
    self._verify_statement(st)
    execute(DeleteStatement(self.table_name, where=where))
    self.assertEqual(TestQueryUpdateModel.objects.count(), 0)
