Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions core/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (

"github.com/cockroachdb/errors"
"github.com/dolthub/dolt/go/libraries/doltcore/doltdb"
"github.com/dolthub/dolt/go/libraries/doltcore/sqle/dsess"
"github.com/dolthub/dolt/go/libraries/doltcore/dsess"
"github.com/dolthub/dolt/go/libraries/doltcore/sqle/resolve"
"github.com/dolthub/go-mysql-server/sql"

Expand Down Expand Up @@ -166,7 +166,7 @@ func GetSqlDatabaseFromContext(ctx *sql.Context, database string) (sql.Database,
if len(database) == 0 {
database = ctx.GetCurrentDatabase()
}
db, err := session.Provider().Database(ctx, database)
db, err := session.GenericProvider().Database(ctx, database)
if err != nil {
if sql.ErrDatabaseNotFound.Is(err) {
return nil, nil
Expand Down
2 changes: 1 addition & 1 deletion core/relations.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ package core
import (
"github.com/cockroachdb/errors"
"github.com/dolthub/dolt/go/libraries/doltcore/doltdb"
"github.com/dolthub/dolt/go/libraries/doltcore/sqle/dsess"
"github.com/dolthub/dolt/go/libraries/doltcore/dsess"
"github.com/dolthub/go-mysql-server/sql"

"github.com/dolthub/doltgresql/core/id"
Expand Down
2 changes: 1 addition & 1 deletion server/connection_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"sync/atomic"

"github.com/cockroachdb/errors"
"github.com/dolthub/dolt/go/libraries/doltcore/sqle/dsess"
"github.com/dolthub/dolt/go/libraries/doltcore/dsess"

Check failure on line 33 in server/connection_handler.go

View workflow job for this annotation

GitHub Actions / Bats tests (ubuntu-22.04)

cannot find module providing package github.com/dolthub/dolt/go/libraries/doltcore/dsess: import lookup disabled by -mod=readonly

Check failure on line 33 in server/connection_handler.go

View workflow job for this annotation

GitHub Actions / Compatibility Test

cannot find module providing package github.com/dolthub/dolt/go/libraries/doltcore/dsess: import lookup disabled by -mod=readonly

Check failure on line 33 in server/connection_handler.go

View workflow job for this annotation

GitHub Actions / Verify format

cannot find module providing package github.com/dolthub/dolt/go/libraries/doltcore/dsess: import lookup disabled by -mod=readonly

Check failure on line 33 in server/connection_handler.go

View workflow job for this annotation

GitHub Actions / Bats tests (macos-latest)

cannot find module providing package github.com/dolthub/dolt/go/libraries/doltcore/dsess: import lookup disabled by -mod=readonly

Check failure on line 33 in server/connection_handler.go

View workflow job for this annotation

GitHub Actions / test (macos-latest)

no required module provides package github.com/dolthub/dolt/go/libraries/doltcore/dsess; to add it:

Check failure on line 33 in server/connection_handler.go

View workflow job for this annotation

GitHub Actions / test (macos-latest)

no required module provides package github.com/dolthub/dolt/go/libraries/doltcore/dsess; to add it:

Check failure on line 33 in server/connection_handler.go

View workflow job for this annotation

GitHub Actions / test (macos-latest)

no required module provides package github.com/dolthub/dolt/go/libraries/doltcore/dsess; to add it:

Check failure on line 33 in server/connection_handler.go

View workflow job for this annotation

GitHub Actions / test (macos-latest)

no required module provides package github.com/dolthub/dolt/go/libraries/doltcore/dsess; to add it:

Check failure on line 33 in server/connection_handler.go

View workflow job for this annotation

GitHub Actions / test (macos-latest)

no required module provides package github.com/dolthub/dolt/go/libraries/doltcore/dsess; to add it:

Check failure on line 33 in server/connection_handler.go

View workflow job for this annotation

GitHub Actions / test (macos-latest)

no required module provides package github.com/dolthub/dolt/go/libraries/doltcore/dsess; to add it:

Check failure on line 33 in server/connection_handler.go

View workflow job for this annotation

GitHub Actions / test (macos-latest)

no required module provides package github.com/dolthub/dolt/go/libraries/doltcore/dsess; to add it:

Check failure on line 33 in server/connection_handler.go

View workflow job for this annotation

GitHub Actions / test (macos-latest)

no required module provides package github.com/dolthub/dolt/go/libraries/doltcore/dsess; to add it:

Check failure on line 33 in server/connection_handler.go

View workflow job for this annotation

GitHub Actions / test (macos-latest)

no required module provides package github.com/dolthub/dolt/go/libraries/doltcore/dsess; to add it:

Check failure on line 33 in server/connection_handler.go

View workflow job for this annotation

GitHub Actions / test (macos-latest)

no required module provides package github.com/dolthub/dolt/go/libraries/doltcore/dsess; to add it:

Check failure on line 33 in server/connection_handler.go

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest)

no required module provides package github.com/dolthub/dolt/go/libraries/doltcore/dsess; to add it:

Check failure on line 33 in server/connection_handler.go

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest)

no required module provides package github.com/dolthub/dolt/go/libraries/doltcore/dsess; to add it:

Check failure on line 33 in server/connection_handler.go

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest)

no required module provides package github.com/dolthub/dolt/go/libraries/doltcore/dsess; to add it:

Check failure on line 33 in server/connection_handler.go

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest)

no required module provides package github.com/dolthub/dolt/go/libraries/doltcore/dsess; to add it:

Check failure on line 33 in server/connection_handler.go

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest)

no required module provides package github.com/dolthub/dolt/go/libraries/doltcore/dsess; to add it:

Check failure on line 33 in server/connection_handler.go

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest)

no required module provides package github.com/dolthub/dolt/go/libraries/doltcore/dsess; to add it:

Check failure on line 33 in server/connection_handler.go

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest)

no required module provides package github.com/dolthub/dolt/go/libraries/doltcore/dsess; to add it:

Check failure on line 33 in server/connection_handler.go

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest)

no required module provides package github.com/dolthub/dolt/go/libraries/doltcore/dsess; to add it:

Check failure on line 33 in server/connection_handler.go

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest)

no required module provides package github.com/dolthub/dolt/go/libraries/doltcore/dsess; to add it:

Check failure on line 33 in server/connection_handler.go

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest)

no required module provides package github.com/dolthub/dolt/go/libraries/doltcore/dsess; to add it:

Check failure on line 33 in server/connection_handler.go

View workflow job for this annotation

GitHub Actions / Run Staticcheck

no required module provides package github.com/dolthub/dolt/go/libraries/doltcore/dsess; to add it:

Check failure on line 33 in server/connection_handler.go

View workflow job for this annotation

GitHub Actions / test (windows-latest)

no required module provides package github.com/dolthub/dolt/go/libraries/doltcore/dsess; to add it:

Check failure on line 33 in server/connection_handler.go

View workflow job for this annotation

GitHub Actions / test (windows-latest)

no required module provides package github.com/dolthub/dolt/go/libraries/doltcore/dsess; to add it:

Check failure on line 33 in server/connection_handler.go

View workflow job for this annotation

GitHub Actions / test (windows-latest)

no required module provides package github.com/dolthub/dolt/go/libraries/doltcore/dsess; to add it:

Check failure on line 33 in server/connection_handler.go

View workflow job for this annotation

GitHub Actions / test (windows-latest)

no required module provides package github.com/dolthub/dolt/go/libraries/doltcore/dsess; to add it:

Check failure on line 33 in server/connection_handler.go

View workflow job for this annotation

GitHub Actions / test (windows-latest)

no required module provides package github.com/dolthub/dolt/go/libraries/doltcore/dsess; to add it:

Check failure on line 33 in server/connection_handler.go

View workflow job for this annotation

GitHub Actions / test (windows-latest)

no required module provides package github.com/dolthub/dolt/go/libraries/doltcore/dsess; to add it:

Check failure on line 33 in server/connection_handler.go

View workflow job for this annotation

GitHub Actions / test (windows-latest)

no required module provides package github.com/dolthub/dolt/go/libraries/doltcore/dsess; to add it:

Check failure on line 33 in server/connection_handler.go

View workflow job for this annotation

GitHub Actions / test (windows-latest)

no required module provides package github.com/dolthub/dolt/go/libraries/doltcore/dsess; to add it:

Check failure on line 33 in server/connection_handler.go

View workflow job for this annotation

GitHub Actions / test (windows-latest)

no required module provides package github.com/dolthub/dolt/go/libraries/doltcore/dsess; to add it:

Check failure on line 33 in server/connection_handler.go

View workflow job for this annotation

GitHub Actions / test (windows-latest)

no required module provides package github.com/dolthub/dolt/go/libraries/doltcore/dsess; to add it:
"github.com/dolthub/dolt/go/libraries/doltcore/sqlserver"
"github.com/dolthub/go-mysql-server/server"
"github.com/dolthub/go-mysql-server/sql"
Expand Down
6 changes: 3 additions & 3 deletions server/functions/iterate.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (

"github.com/cockroachdb/errors"
"github.com/dolthub/dolt/go/libraries/doltcore/doltdb"
"github.com/dolthub/dolt/go/libraries/doltcore/sqle/dsess"
"github.com/dolthub/dolt/go/libraries/doltcore/dsess"
"github.com/dolthub/go-mysql-server/sql"

"github.com/dolthub/doltgresql/core"
Expand Down Expand Up @@ -126,7 +126,7 @@ type ItemView struct {
// items. This function should be expanded as we add more items to iterate over.
func IterateDatabase(ctx *sql.Context, database string, callbacks Callbacks) error {
sess := ctx.Session.(*dsess.DoltSession)
currentDatabase, err := sess.Provider().Database(ctx, database)
currentDatabase, err := sess.GenericProvider().Database(ctx, database)
if err != nil {
return err
}
Expand Down Expand Up @@ -481,7 +481,7 @@ func RunCallback(ctx *sql.Context, internalID id.Id, callbacks Callbacks) error
}
// We know we have the relevant callback for the given section, so we'll grab the schema
doltSession := dsess.DSessFromSess(ctx.Session)
currentDatabase, err := doltSession.Provider().Database(ctx, ctx.GetCurrentDatabase())
currentDatabase, err := doltSession.GenericProvider().Database(ctx, ctx.GetCurrentDatabase())
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion server/functions/pg_get_serial_sequence.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (

"github.com/cockroachdb/errors"
"github.com/dolthub/dolt/go/libraries/doltcore/doltdb"
"github.com/dolthub/dolt/go/libraries/doltcore/sqle/dsess"
"github.com/dolthub/dolt/go/libraries/doltcore/dsess"
"github.com/dolthub/dolt/go/libraries/doltcore/sqle/resolve"
"github.com/dolthub/go-mysql-server/sql"

Expand Down
2 changes: 1 addition & 1 deletion server/node/alter_sequence.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (

"github.com/cockroachdb/errors"
"github.com/dolthub/dolt/go/libraries/doltcore/doltdb"
"github.com/dolthub/dolt/go/libraries/doltcore/sqle/dsess"
"github.com/dolthub/dolt/go/libraries/doltcore/dsess"
"github.com/dolthub/go-mysql-server/sql"
"github.com/dolthub/go-mysql-server/sql/plan"
vitess "github.com/dolthub/vitess/go/vt/sqlparser"
Expand Down
2 changes: 1 addition & 1 deletion server/node/no_op.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"fmt"
"io"

"github.com/dolthub/dolt/go/libraries/doltcore/sqle/dsess"
"github.com/dolthub/dolt/go/libraries/doltcore/dsess"
"github.com/dolthub/go-mysql-server/sql"
vitess "github.com/dolthub/vitess/go/vt/sqlparser"
"github.com/jackc/pgx/v5/pgproto3"
Expand Down
3 changes: 1 addition & 2 deletions server/pg_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ package server

import (
"github.com/dolthub/dolt/go/libraries/doltcore/sqle"
"github.com/dolthub/dolt/go/libraries/doltcore/sqle/dsess"
"github.com/dolthub/dolt/go/libraries/utils/filesys"
"github.com/dolthub/go-mysql-server/sql"

Expand Down Expand Up @@ -70,7 +69,7 @@ var _ sqle.ProviderFactory = DoltgresProviderFactory{}

// NewProvider overrides DoltProviderFactory.NewProvider to wrap the created provider in
// DoltgresDatabaseProvider before returning it.
func (f DoltgresProviderFactory) NewProvider(defaultBranch string, fs filesys.Filesys, databases []dsess.SqlDatabase, locations []filesys.Filesys, overrides sql.EngineOverrides) (sql.DatabaseProvider, error) {
func (f DoltgresProviderFactory) NewProvider(defaultBranch string, fs filesys.Filesys, databases []sqle.SqlDatabase, locations []filesys.Filesys, overrides sql.EngineOverrides) (sql.DatabaseProvider, error) {
inner, err := f.DoltProviderFactory.NewProvider(defaultBranch, fs, databases, locations, overrides)
if err != nil {
return nil, err
Expand Down
2 changes: 1 addition & 1 deletion server/plpgsql/interpreter_logic.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"strings"

"github.com/cockroachdb/errors"
"github.com/dolthub/dolt/go/libraries/doltcore/sqle/dsess"
"github.com/dolthub/dolt/go/libraries/doltcore/dsess"
"github.com/dolthub/go-mysql-server/sql"
"github.com/jackc/pgx/v5/pgproto3"

Expand Down
2 changes: 1 addition & 1 deletion server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"github.com/dolthub/dolt/go/libraries/doltcore/env"
doltservercfg "github.com/dolthub/dolt/go/libraries/doltcore/servercfg"
"github.com/dolthub/dolt/go/libraries/doltcore/sqle/dfunctions"
"github.com/dolthub/dolt/go/libraries/doltcore/sqle/dsess"
"github.com/dolthub/dolt/go/libraries/doltcore/dsess"
"github.com/dolthub/dolt/go/libraries/doltcore/sqle/resolve"
"github.com/dolthub/dolt/go/libraries/utils/argparser"
"github.com/dolthub/dolt/go/libraries/utils/config"
Expand Down
4 changes: 2 additions & 2 deletions server/tables/pgcatalog/pg_database.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"io"
"sort"

"github.com/dolthub/dolt/go/libraries/doltcore/sqle/dsess"
"github.com/dolthub/dolt/go/libraries/doltcore/dsess"
sqle "github.com/dolthub/go-mysql-server"
"github.com/dolthub/go-mysql-server/sql"

Expand Down Expand Up @@ -49,7 +49,7 @@ func (p PgDatabaseHandler) Name() string {
func (p PgDatabaseHandler) RowIter(ctx *sql.Context, partition sql.Partition) (sql.RowIter, error) {
// TODO: Should the catalog be passed to RowIter like it is for the information_schema tables RowIter?
doltSession := dsess.DSessFromSess(ctx.Session)
c := sqle.NewDefault(doltSession.Provider()).Analyzer.Catalog
c := sqle.NewDefault(doltSession.GenericProvider()).Analyzer.Catalog

databases := c.AllDatabases(ctx)
dbs := make([]sql.Database, 0, len(databases))
Expand Down
2 changes: 1 addition & 1 deletion testing/go/enginetest/doltgres_engine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"github.com/dolthub/dolt/go/libraries/doltcore/dtestutils"
"github.com/dolthub/dolt/go/libraries/doltcore/env"
"github.com/dolthub/dolt/go/libraries/doltcore/sqle"
"github.com/dolthub/dolt/go/libraries/doltcore/sqle/dsess"
"github.com/dolthub/dolt/go/libraries/doltcore/dsess"

Check failure on line 35 in testing/go/enginetest/doltgres_engine_test.go

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest)

no required module provides package github.com/dolthub/dolt/go/libraries/doltcore/dsess; to add it:

Check failure on line 35 in testing/go/enginetest/doltgres_engine_test.go

View workflow job for this annotation

GitHub Actions / test (macos-latest)

no required module provides package github.com/dolthub/dolt/go/libraries/doltcore/dsess; to add it:

Check failure on line 35 in testing/go/enginetest/doltgres_engine_test.go

View workflow job for this annotation

GitHub Actions / test (windows-latest)

no required module provides package github.com/dolthub/dolt/go/libraries/doltcore/dsess; to add it:
"github.com/dolthub/dolt/go/libraries/utils/config"
)

Expand Down
2 changes: 1 addition & 1 deletion testing/go/enginetest/doltgres_harness_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"time"

"github.com/cockroachdb/errors"
"github.com/dolthub/dolt/go/libraries/doltcore/sqle/dsess"
"github.com/dolthub/dolt/go/libraries/doltcore/dsess"
denginetest "github.com/dolthub/dolt/go/libraries/doltcore/sqle/enginetest"
"github.com/dolthub/dolt/go/libraries/utils/svcs"
gms "github.com/dolthub/go-mysql-server"
Expand Down
Loading