code: func DjangoAdminLogsByContentTypeID(db XODB, contentTypeID sql.NullInt64) ([]*DjangoAdminLog, error) {
  	var err error
  
  	// sql query
  	const sqlstr = `SELECT ` +
  		`id, action_time, object_id, object_repr, action_flag, change_message, content_type_id, user_id ` +
  		`FROM public.django_admin_log ` +
  		`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 := []*DjangoAdminLog{}
  	for q.Next() {
  		dal := DjangoAdminLog{
  			_exists: true,
  		}
  
  		// scan
  		err = q.Scan(&dal.ID, &dal.ActionTime, &dal.ObjectID, &dal.ObjectRepr, &dal.ActionFlag, &dal.ChangeMessage, &dal.ContentTypeID, &dal.UserID)
  		if err != nil {
  			return nil, err
  		}
  
  		res = append(res, &dal)
  	}
  
  	return res, nil
  }
docs: // DjangoAdminLogsByContentTypeID retrieves a row from 'public.django_admin_log' as a DjangoAdminLog.
  //
  // Generated from index 'django_admin_log_417f1b1c'.