code: func (agp *AuthGroupPermission) Update(db XODB) error {
  	var err error
  
  	// if doesn't exist, bail
  	if !agp._exists {
  		return errors.New("update failed: does not exist")
  	}
  
  	// if deleted, bail
  	if agp._deleted {
  		return errors.New("update failed: marked for deletion")
  	}
  
  	// sql query
  	const sqlstr = `UPDATE auth_group_permissions SET ` +
  		`group_id = ?, permission_id = ?` +
  		` WHERE id = ?`
  
  	// run query
  	XOLog(sqlstr, agp.GroupID, agp.PermissionID, agp.ID)
  	_, err = db.Exec(sqlstr, agp.GroupID, agp.PermissionID, agp.ID)
  	return err
  }
docs: // Update updates the AuthGroupPermission in the database.