code: func (m *Msg) Save(db *sqlx.DB) error {
  	var pluginName string
  	if m.Plugin != nil {
  		pluginName = m.Plugin.Config.Name
  	}
  	q := `INSERT INTO messages
  	      (userid, sentence, plugin, route, abotsent, needstraining, flexid,
  		flexidtype, trained)
  	      VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING id`
  	row := db.QueryRowx(q, m.User.ID, m.Sentence, pluginName, m.Route,
  		m.AbotSent, m.NeedsTraining, m.User.FlexID, m.User.FlexIDType,
  		m.Trained)
  	if err := row.Scan(&m.ID); err != nil {
  		return err
  	}
  	return nil
  }
docs: // Save a message to the database, updating the message ID.