// ExecInstance executes a given query on the given MySQL topology instance func ExecInstance(instanceKey *InstanceKey, query string, args ...interface{}) (sql.Result, error) { db, err := db.OpenTopology(instanceKey.Hostname, instanceKey.Port) if err != nil { return nil, err } res, err := sqlutils.Exec(db, query, args...) return res, err }
// ExecOrchestrator will execute given query on the orchestrator backend database. func ExecOrchestrator(query string, args ...interface{}) (sql.Result, error) { if config.Config.DatabaselessMode__experimental { return DummySqlResult{}, nil } db, err := OpenOrchestrator() if err != nil { return nil, err } res, err := sqlutils.Exec(db, query, args...) return res, err }