diff --git a/pkg/kine/drivers/generic/generic.go b/pkg/kine/drivers/generic/generic.go index d6c47efa..20fc05db 100644 --- a/pkg/kine/drivers/generic/generic.go +++ b/pkg/kine/drivers/generic/generic.go @@ -132,7 +132,6 @@ type Generic struct { LastInsertID bool DB *prepared.DB GetCurrentSQL string - GetRevisionSQL string RevisionSQL string ListRevisionStartSQL string GetRevisionAfterSQL string @@ -224,12 +223,6 @@ func Open(ctx context.Context, driverName, dataSourceName string, paramCharacter return &Generic{ DB: prepared.New(db), - GetRevisionSQL: q(fmt.Sprintf(` - SELECT - %s - FROM kine kv - WHERE kv.id = ?`, columns), paramCharacter, numbered), - GetCurrentSQL: q(fmt.Sprintf(listSQL, ""), paramCharacter, numbered), ListRevisionStartSQL: q(fmt.Sprintf(listSQL, "AND mkv.id <= ?"), paramCharacter, numbered), GetRevisionAfterSQL: q(revisionAfterSQL, paramCharacter, numbered), @@ -626,20 +619,6 @@ func (d *Generic) GetCompactRevision(ctx context.Context) (int64, int64, error) return compact.Int64, target.Int64, err } -func (d *Generic) GetRevision(ctx context.Context, revision int64) (*sql.Rows, error) { - var err error - getRevisionCnt.Add(ctx, 1) - ctx, span := otelTracer.Start(ctx, fmt.Sprintf("%s.get_revision", otelName)) - defer func() { - span.RecordError(err) - span.End() - }() - span.SetAttributes(attribute.Int64("revision", revision)) - - result, err := d.query(ctx, "get_revision_sql", d.GetRevisionSQL, revision) - return result, err -} - func (d *Generic) DeleteRevision(ctx context.Context, revision int64) error { var err error deleteRevCnt.Add(ctx, 1) diff --git a/pkg/kine/logstructured/sqllog/sql.go b/pkg/kine/logstructured/sqllog/sql.go index 8b11e6ae..ccff227c 100644 --- a/pkg/kine/logstructured/sqllog/sql.go +++ b/pkg/kine/logstructured/sqllog/sql.go @@ -67,7 +67,6 @@ type Dialect interface { After(ctx context.Context, rev, limit int64) (*sql.Rows, error) Insert(ctx context.Context, key string, create, delete bool, createRevision, previousRevision int64, ttl int64, value, prevValue []byte) (int64, error) Create(ctx context.Context, key string, value []byte, lease int64) (int64, error) - GetRevision(ctx context.Context, revision int64) (*sql.Rows, error) DeleteRevision(ctx context.Context, revision int64) error GetCompactRevision(ctx context.Context) (int64, int64, error) Compact(ctx context.Context, revision int64) error