diff --git a/yb-voyager/cmd/analyzeSchema.go b/yb-voyager/cmd/analyzeSchema.go index 9a551d0bc..33c45caac 100644 --- a/yb-voyager/cmd/analyzeSchema.go +++ b/yb-voyager/cmd/analyzeSchema.go @@ -36,8 +36,8 @@ import ( "github.com/yugabyte/yb-voyager/yb-voyager/src/callhome" "github.com/yugabyte/yb-voyager/yb-voyager/src/cp" "github.com/yugabyte/yb-voyager/yb-voyager/src/metadb" - "github.com/yugabyte/yb-voyager/yb-voyager/src/queryissue" - "github.com/yugabyte/yb-voyager/yb-voyager/src/queryparser" + "github.com/yugabyte/yb-voyager/yb-voyager/src/query/queryissue" + "github.com/yugabyte/yb-voyager/yb-voyager/src/query/queryparser" "github.com/yugabyte/yb-voyager/yb-voyager/src/srcdb" "github.com/yugabyte/yb-voyager/yb-voyager/src/utils" "github.com/yugabyte/yb-voyager/yb-voyager/src/utils/sqlname" diff --git a/yb-voyager/cmd/assessMigrationCommand.go b/yb-voyager/cmd/assessMigrationCommand.go index f15c43a0f..b158ef8f1 100644 --- a/yb-voyager/cmd/assessMigrationCommand.go +++ b/yb-voyager/cmd/assessMigrationCommand.go @@ -41,8 +41,8 @@ import ( "github.com/yugabyte/yb-voyager/yb-voyager/src/cp" "github.com/yugabyte/yb-voyager/yb-voyager/src/metadb" "github.com/yugabyte/yb-voyager/yb-voyager/src/migassessment" - "github.com/yugabyte/yb-voyager/yb-voyager/src/queryissue" - "github.com/yugabyte/yb-voyager/yb-voyager/src/queryparser" + "github.com/yugabyte/yb-voyager/yb-voyager/src/query/queryissue" + "github.com/yugabyte/yb-voyager/yb-voyager/src/query/queryparser" "github.com/yugabyte/yb-voyager/yb-voyager/src/srcdb" "github.com/yugabyte/yb-voyager/yb-voyager/src/utils" "github.com/yugabyte/yb-voyager/yb-voyager/src/ybversion" diff --git a/yb-voyager/cmd/importSchemaYugabyteDB.go b/yb-voyager/cmd/importSchemaYugabyteDB.go index e651d0a5f..ecdf28446 100644 --- a/yb-voyager/cmd/importSchemaYugabyteDB.go +++ b/yb-voyager/cmd/importSchemaYugabyteDB.go @@ -27,7 +27,7 @@ import ( log "github.com/sirupsen/logrus" "golang.org/x/exp/slices" - "github.com/yugabyte/yb-voyager/yb-voyager/src/queryparser" + "github.com/yugabyte/yb-voyager/yb-voyager/src/query/queryparser" "github.com/yugabyte/yb-voyager/yb-voyager/src/utils" ) diff --git a/yb-voyager/go.mod b/yb-voyager/go.mod index b761c2d4a..0ac1232d7 100644 --- a/yb-voyager/go.mod +++ b/yb-voyager/go.mod @@ -11,6 +11,7 @@ require ( github.com/aws/aws-sdk-go-v2/config v1.18.15 github.com/aws/aws-sdk-go-v2/service/s3 v1.30.5 github.com/davecgh/go-spew v1.1.1 + github.com/docker/go-connections v0.5.0 github.com/dustin/go-humanize v1.0.1 github.com/fatih/color v1.13.0 github.com/fergusstrange/embedded-postgres v1.29.0 @@ -23,6 +24,7 @@ require ( github.com/jackc/pgconn v1.13.0 github.com/jackc/pgx/v4 v4.17.2 github.com/jackc/pgx/v5 v5.0.3 + github.com/lib/pq v1.10.9 github.com/mattn/go-sqlite3 v1.14.17 github.com/mcuadros/go-version v0.0.0-20190830083331-035f6764e8d2 github.com/mitchellh/go-ps v1.0.0 @@ -54,7 +56,6 @@ require ( github.com/cpuguy83/dockercfg v0.3.2 // indirect github.com/distribution/reference v0.6.0 // indirect github.com/docker/docker v27.1.1+incompatible // indirect - github.com/docker/go-connections v0.5.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/go-logr/logr v1.4.1 // indirect @@ -64,7 +65,6 @@ require ( github.com/jackc/puddle v1.3.0 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/klauspost/compress v1.17.4 // indirect - github.com/lib/pq v1.10.9 // indirect github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect github.com/moby/docker-image-spec v1.3.1 // indirect github.com/moby/patternmatcher v0.6.0 // indirect diff --git a/yb-voyager/src/queryissue/constants.go b/yb-voyager/src/query/queryissue/constants.go similarity index 100% rename from yb-voyager/src/queryissue/constants.go rename to yb-voyager/src/query/queryissue/constants.go diff --git a/yb-voyager/src/queryissue/detectors.go b/yb-voyager/src/query/queryissue/detectors.go similarity index 98% rename from yb-voyager/src/queryissue/detectors.go rename to yb-voyager/src/query/queryissue/detectors.go index 91d4df4a5..a89da8c54 100644 --- a/yb-voyager/src/queryissue/detectors.go +++ b/yb-voyager/src/query/queryissue/detectors.go @@ -19,7 +19,7 @@ import ( log "github.com/sirupsen/logrus" "google.golang.org/protobuf/reflect/protoreflect" - "github.com/yugabyte/yb-voyager/yb-voyager/src/queryparser" + "github.com/yugabyte/yb-voyager/yb-voyager/src/query/queryparser" ) const ( diff --git a/yb-voyager/src/queryissue/detectors_ddl.go b/yb-voyager/src/query/queryissue/detectors_ddl.go similarity index 99% rename from yb-voyager/src/queryissue/detectors_ddl.go rename to yb-voyager/src/query/queryissue/detectors_ddl.go index 4ead97e4e..f2b6b2f9f 100644 --- a/yb-voyager/src/queryissue/detectors_ddl.go +++ b/yb-voyager/src/query/queryissue/detectors_ddl.go @@ -22,7 +22,7 @@ import ( "github.com/samber/lo" - "github.com/yugabyte/yb-voyager/yb-voyager/src/queryparser" + "github.com/yugabyte/yb-voyager/yb-voyager/src/query/queryparser" "github.com/yugabyte/yb-voyager/yb-voyager/src/srcdb" "github.com/yugabyte/yb-voyager/yb-voyager/src/utils" ) diff --git a/yb-voyager/src/queryissue/detectors_test.go b/yb-voyager/src/query/queryissue/detectors_test.go similarity index 99% rename from yb-voyager/src/queryissue/detectors_test.go rename to yb-voyager/src/query/queryissue/detectors_test.go index a6cefc0a2..194aff8e4 100644 --- a/yb-voyager/src/queryissue/detectors_test.go +++ b/yb-voyager/src/query/queryissue/detectors_test.go @@ -24,7 +24,7 @@ import ( "github.com/stretchr/testify/assert" "google.golang.org/protobuf/reflect/protoreflect" - "github.com/yugabyte/yb-voyager/yb-voyager/src/queryparser" + "github.com/yugabyte/yb-voyager/yb-voyager/src/query/queryparser" ) func TestFuncCallDetector(t *testing.T) { diff --git a/yb-voyager/src/queryissue/helpers.go b/yb-voyager/src/query/queryissue/helpers.go similarity index 100% rename from yb-voyager/src/queryissue/helpers.go rename to yb-voyager/src/query/queryissue/helpers.go diff --git a/yb-voyager/src/queryissue/issues_ddl.go b/yb-voyager/src/query/queryissue/issues_ddl.go similarity index 100% rename from yb-voyager/src/queryissue/issues_ddl.go rename to yb-voyager/src/query/queryissue/issues_ddl.go diff --git a/yb-voyager/src/queryissue/issues_dml.go b/yb-voyager/src/query/queryissue/issues_dml.go similarity index 100% rename from yb-voyager/src/queryissue/issues_dml.go rename to yb-voyager/src/query/queryissue/issues_dml.go diff --git a/yb-voyager/src/queryissue/parser_issue_detector.go b/yb-voyager/src/query/queryissue/parser_issue_detector.go similarity index 99% rename from yb-voyager/src/queryissue/parser_issue_detector.go rename to yb-voyager/src/query/queryissue/parser_issue_detector.go index 1af42cf0c..27d28fa93 100644 --- a/yb-voyager/src/queryissue/parser_issue_detector.go +++ b/yb-voyager/src/query/queryissue/parser_issue_detector.go @@ -25,7 +25,7 @@ import ( log "github.com/sirupsen/logrus" "google.golang.org/protobuf/reflect/protoreflect" - "github.com/yugabyte/yb-voyager/yb-voyager/src/queryparser" + "github.com/yugabyte/yb-voyager/yb-voyager/src/query/queryparser" "github.com/yugabyte/yb-voyager/yb-voyager/src/ybversion" ) diff --git a/yb-voyager/src/queryissue/query_issue.go b/yb-voyager/src/query/queryissue/query_issue.go similarity index 100% rename from yb-voyager/src/queryissue/query_issue.go rename to yb-voyager/src/query/queryissue/query_issue.go diff --git a/yb-voyager/src/queryparser/ddl_processor.go b/yb-voyager/src/query/queryparser/ddl_processor.go similarity index 100% rename from yb-voyager/src/queryparser/ddl_processor.go rename to yb-voyager/src/query/queryparser/ddl_processor.go diff --git a/yb-voyager/src/queryparser/helpers_protomsg.go b/yb-voyager/src/query/queryparser/helpers_protomsg.go similarity index 100% rename from yb-voyager/src/queryparser/helpers_protomsg.go rename to yb-voyager/src/query/queryparser/helpers_protomsg.go diff --git a/yb-voyager/src/queryparser/helpers_struct.go b/yb-voyager/src/query/queryparser/helpers_struct.go similarity index 100% rename from yb-voyager/src/queryparser/helpers_struct.go rename to yb-voyager/src/query/queryparser/helpers_struct.go diff --git a/yb-voyager/src/queryparser/object_collector.go b/yb-voyager/src/query/queryparser/object_collector.go similarity index 100% rename from yb-voyager/src/queryparser/object_collector.go rename to yb-voyager/src/query/queryparser/object_collector.go diff --git a/yb-voyager/src/queryparser/query_parser.go b/yb-voyager/src/query/queryparser/query_parser.go similarity index 100% rename from yb-voyager/src/queryparser/query_parser.go rename to yb-voyager/src/query/queryparser/query_parser.go diff --git a/yb-voyager/src/queryparser/traversal_plpgsql.go b/yb-voyager/src/query/queryparser/traversal_plpgsql.go similarity index 100% rename from yb-voyager/src/queryparser/traversal_plpgsql.go rename to yb-voyager/src/query/queryparser/traversal_plpgsql.go diff --git a/yb-voyager/src/queryparser/traversal_proto.go b/yb-voyager/src/query/queryparser/traversal_proto.go similarity index 100% rename from yb-voyager/src/queryparser/traversal_proto.go rename to yb-voyager/src/query/queryparser/traversal_proto.go diff --git a/yb-voyager/src/queryparser/traversal_test.go b/yb-voyager/src/query/queryparser/traversal_test.go similarity index 100% rename from yb-voyager/src/queryparser/traversal_test.go rename to yb-voyager/src/query/queryparser/traversal_test.go