code: func UpdateDeviceQueueItem(db sqlx.Execer, qi *DeviceQueueItem) error {
  	qi.UpdatedAt = time.Now()
  
  	res, err := db.Exec(`
          update device_queue
          set
              updated_at = $2,
              dev_eui = $3,
              frm_payload = $4,
              f_cnt = $5,
              f_port = $6,
              confirmed = $7,
              emit_at_time_since_gps_epoch = $8,
              is_pending = $9,
              timeout_after = $10,
  			dev_addr = $11
          where
              id = $1`,
  		qi.ID,
  		qi.UpdatedAt,
  		qi.DevEUI[:],
  		qi.FRMPayload,
  		qi.FCnt,
  		qi.FPort,
  		qi.Confirmed,
  		qi.EmitAtTimeSinceGPSEpoch,
  		qi.IsPending,
  		qi.TimeoutAfter,
  		qi.DevAddr[:],
  	)
  	if err != nil {
  		return handlePSQLError(err, "update error")
  	}
  	ra, err := res.RowsAffected()
  	if err != nil {
  		return errors.Wrap(err, "get rows affected error")
  	}
  	if ra == 0 {
  		return ErrDoesNotExist
  	}
  
  	log.WithFields(log.Fields{
  		"f_cnt":                        qi.FCnt,
  		"dev_eui":                      qi.DevEUI,
  		"is_pending":                   qi.IsPending,
  		"emit_at_time_since_gps_epoch": qi.EmitAtTimeSinceGPSEpoch,
  		"timeout_after":                qi.TimeoutAfter,
  	}).Info("device-queue item updated")
  
  	return nil
  }
docs: // UpdateDeviceQueueItem updates the given device-queue item.