code: func AuthPermissionsByContentTypeID(db XODB, contentTypeID float64) ([]*AuthPermission, error) {
  	var err error
  
  	// sql query
  	const sqlstr = `SELECT ` +
  		`id, name, content_type_id, codename ` +
  		`FROM django.auth_permission ` +
  		`WHERE content_type_id = :1`
  
  	// run query
  	XOLog(sqlstr, contentTypeID)
  	q, err := db.Query(sqlstr, contentTypeID)
  	if err != nil {
  		return nil, err
  	}
  	defer q.Close()
  
  	// load results
  	res := []*AuthPermission{}
  	for q.Next() {
  		ap := AuthPermission{
  			_exists: true,
  		}
  
  		// scan
  		err = q.Scan(&ap.ID, &ap.Name, &ap.ContentTypeID, &ap.Codename)
  		if err != nil {
  			return nil, err
  		}
  
  		res = append(res, &ap)
  	}
  
  	return res, nil
  }
docs: // AuthPermissionsByContentTypeID retrieves a row from 'django.auth_permission' as a AuthPermission.
  //
  // Generated from index 'auth_permission_417f1b1c'.