mirror of
https://github.com/dolthub/dolt.git
synced 2026-03-09 01:56:30 -05:00
Merge pull request #5998 from dolthub/nicktobey/connectionqueryist
Add docstring to ConnectionQueryist.
This commit is contained in:
@@ -454,10 +454,13 @@ func secondsSince(start time.Time, end time.Time) float64 {
|
||||
return timeDisplay
|
||||
}
|
||||
|
||||
// ConnectionQueryist executes queries by connecting to a running mySql server.
|
||||
type ConnectionQueryist struct {
|
||||
connection *dbr.Connection
|
||||
}
|
||||
|
||||
var _ cli.Queryist = ConnectionQueryist{}
|
||||
|
||||
func (c ConnectionQueryist) Query(ctx *sql.Context, query string) (sql.Schema, sql.RowIter, error) {
|
||||
rows, err := c.connection.QueryContext(ctx, query)
|
||||
if err != nil {
|
||||
@@ -470,8 +473,6 @@ func (c ConnectionQueryist) Query(ctx *sql.Context, query string) (sql.Schema, s
|
||||
return rowIter.Schema(), rowIter, nil
|
||||
}
|
||||
|
||||
var _ cli.Queryist = ConnectionQueryist{}
|
||||
|
||||
// BuildConnectionStringQueryist returns a Queryist that connects to the server specified by the given server config. Presence in this
|
||||
// module isn't ideal, but it's the only way to get the server config into the queryist.
|
||||
func BuildConnectionStringQueryist(ctx context.Context, cwdFS filesys.Filesys, apr *argparser.ArgParseResults, port int, database string) (cli.LateBindQueryist, error) {
|
||||
|
||||
Reference in New Issue
Block a user