Skip to content

Commit

Permalink
chore(internal/query/conn): linted
Browse files Browse the repository at this point in the history
  • Loading branch information
vladDotH committed Nov 17, 2024
1 parent ed723c4 commit 10c3bd4
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 10 deletions.
7 changes: 2 additions & 5 deletions internal/query/conn/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ type resultNoRows struct{}
func (resultNoRows) LastInsertId() (int64, error) { return 0, ErrUnsupported }
func (resultNoRows) RowsAffected() (int64, error) { return 0, ErrUnsupported }

var (
_ driver.Result = resultNoRows{}
)
var _ driver.Result = resultNoRows{}

type Parent interface {
Query() *query.Client
Expand Down Expand Up @@ -141,7 +139,6 @@ func (c *Conn) execContext(
}()

normalizedQuery, params, err := c.normalize(query, args...)

if err != nil {
return nil, xerrors.WithStackTrace(err)
}
Expand Down Expand Up @@ -169,7 +166,7 @@ func (c *Conn) queryContext(ctx context.Context, query string, args []driver.Nam
return c.currentTx.QueryContext(ctx, query, args)
}

var onDone = trace.DatabaseSQLOnConnQuery(c.parent.Trace(), &ctx,
onDone := trace.DatabaseSQLOnConnQuery(c.parent.Trace(), &ctx,
stack.FunctionID("github.com/ydb-platform/ydb-go-sdk/v3/internal/query/conn.(*Conn).queryContext"),
query, tableConn.UnknownQueryMode.String(), xcontext.IsIdempotent(ctx), c.parent.Clock().Since(c.LastUsage()),
)
Expand Down
6 changes: 3 additions & 3 deletions internal/query/conn/driver.impls.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func (c *Conn) QueryContext(ctx context.Context, query string, args []driver.Nam
}

func (c *Conn) Prepare(query string) (driver.Stmt, error) {
//TODO implement me
// TODO implement me

Check failure on line 116 in internal/query/conn/driver.impls.go

View workflow job for this annotation

GitHub Actions / golangci-lint

internal/query/conn/driver.impls.go:116: Line contains TODO/BUG/FIXME: "TODO implement me" (godox)
panic("implement me")
}

Expand Down Expand Up @@ -150,11 +150,11 @@ func (c *Conn) Close() (finalErr error) {
}

func (c *Conn) Begin() (driver.Tx, error) {
//TODO implement me
// TODO implement me

Check failure on line 153 in internal/query/conn/driver.impls.go

View workflow job for this annotation

GitHub Actions / golangci-lint

internal/query/conn/driver.impls.go:153: Line contains TODO/BUG/FIXME: "TODO implement me" (godox)
panic("implement me")
}

func (c *Conn) LastUsage() time.Time {
//TODO implement me
// TODO implement me

Check failure on line 158 in internal/query/conn/driver.impls.go

View workflow job for this annotation

GitHub Actions / golangci-lint

internal/query/conn/driver.impls.go:158: Line contains TODO/BUG/FIXME: "TODO implement me" (godox)
panic("implement me")
}
1 change: 0 additions & 1 deletion internal/query/conn/rows.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ func (r *rows) Next(dst []driver.Value) error {
ctx := context.Background()

nextRow, err := r.nextSet.NextRow(ctx)

if err != nil {
if errors.Is(err, io.EOF) {
return err
Expand Down
1 change: 0 additions & 1 deletion internal/query/conn/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ func (tx *transaction) ExecContext(ctx context.Context, query string, args []dri
err = tx.tx.Exec(ctx,
query, options.WithParameters(&parameters),
)

if err != nil {
return nil, badconn.Map(xerrors.WithStackTrace(err))
}
Expand Down

0 comments on commit 10c3bd4

Please sign in to comment.