Insert the passed +data+ into the table. Raises Invalid if a where
        clause is present (i.e. no INSERT INTO table WHERE)

def insert(self, **data):
        """
        Insert the passed +data+ into the table. Raises Invalid if a where
        clause is present (i.e. no INSERT INTO table WHERE)
        """
        if self.where_clause:
            raise Invalid("Cannot insert with 'where' clause.")
        # Ensure that order is preserved
        data = data.items()
        cmd = "insert into {table} ({attrs}) values ({values})".format(
            table=self.table_name,
            attrs=", ".join(entry[0] for entry in data),
            values=", ".join(["?"] * len(data)),
        )
        handle = Repo.db.execute(cmd, [entry[1] for entry in data])
        # Return the id of the added row
        return handle.lastrowid