code: func CreateMulticastGroup(db sqlx.Execer, mg *MulticastGroup) error {
  	now := time.Now()
  	mg.CreatedAt = now
  	mg.UpdatedAt = now
  
  	if mg.ID == uuid.Nil {
  		var err error
  		mg.ID, err = uuid.NewV4()
  		if err != nil {
  			return errors.Wrap(err, "new uuid v4 error")
  		}
  	}
  
  	_, err := db.Exec(`
  		insert into multicast_group (
  			id,
  			created_at,
  			updated_at,
  			mc_addr,
  			mc_nwk_s_key,
  			f_cnt,
  			group_type,
  			dr,
  			frequency,
  			ping_slot_period,
  			service_profile_id,
  			routing_profile_id
  		) values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12)`,
  		mg.ID,
  		mg.CreatedAt,
  		mg.UpdatedAt,
  		mg.MCAddr[:],
  		mg.MCNwkSKey[:],
  		mg.FCnt,
  		mg.GroupType,
  		mg.DR,
  		mg.Frequency,
  		mg.PingSlotPeriod,
  		mg.ServiceProfileID,
  		mg.RoutingProfileID,
  	)
  	if err != nil {
  		return handlePSQLError(err, "insert error")
  	}
  
  	log.WithFields(log.Fields{
  		"id": mg.ID,
  	}).Info("multicast-group created")
  
  	return nil
  }
docs: // CreateMulticastGroup creates the given multi-cast group.