Builds and executes an delete statement.

    :param table_name: the name of the table to delete from
    :param constraints: can be any construct that can be parsed by SqlWriter.parse_constraints.
    :return: a cursor object

def delete(self, table_name, constraints=None):
    """Builds and executes an delete statement.

    :param table_name: the name of the table to delete from
    :param constraints: can be any construct that can be parsed by SqlWriter.parse_constraints.
    :return: a cursor object
    """
    if constraints is None:
      constraints = "1=1"
    where, params = self.sql_writer.parse_constraints(constraints)
    sql = "delete from {0} where {1};".format(table_name, where)
    self.execute(sql, params)