Skip to content

Commit

Permalink
Merge pull request #1037 from go-kivik/sqliteUnimplemented
Browse files Browse the repository at this point in the history
x/sqlite: Return errors for unimplemented methods
  • Loading branch information
flimzy authored Jul 25, 2024
2 parents 01f682d + 00dc595 commit 25d56e0
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions x/sqlite/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ package sqlite
import (
"context"
"database/sql"
"errors"
"fmt"
"log"
"net/http"
Expand Down Expand Up @@ -54,43 +55,43 @@ func (d *db) Ping(ctx context.Context) error {
/* -- stub methods -- */

func (db) Stats(context.Context) (*driver.DBStats, error) {
return nil, nil
return nil, errors.New("not implemented")
}

func (db) Compact(context.Context) error {
return nil
return errors.New("not implemented")
}

func (db) CompactView(context.Context, string) error {
return nil
return errors.New("not implemented")
}

func (db) ViewCleanup(context.Context) error {
return nil
return errors.New("not implemented")
}

func (db) BulkDocs(context.Context, []interface{}, driver.Options) ([]driver.BulkResult, error) {
return nil, nil
return nil, errors.New("not implemented")
}

func (db) Copy(context.Context, string, string, driver.Options) (string, error) {
return "", nil
return "", errors.New("not implemented")
}

func (db) CreateIndex(context.Context, string, string, interface{}, driver.Options) error {
return nil
return errors.New("not implemented")
}

func (db) GetIndexes(context.Context, driver.Options) ([]driver.Index, error) {
return nil, nil
return nil, errors.New("not implemented")
}

func (db) DeleteIndex(context.Context, string, string, driver.Options) error {
return nil
return errors.New("not implemented")
}

func (db) Explain(context.Context, interface{}, driver.Options) (*driver.QueryPlan, error) {
return nil, nil
return nil, errors.New("not implemented")
}

// errDatabaseNotFound converts a sqlite "no such table" error into a kivik
Expand Down

0 comments on commit 25d56e0

Please sign in to comment.