Skip to content

Commit 286d354

Browse files
author
billcheng
committed
fixed path issue
1 parent 061566b commit 286d354

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+120
-106
lines changed

.DS_Store

0 Bytes
Binary file not shown.

analyzer.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ import (
2323
"strings"
2424
"unicode"
2525

26-
"go-sql2struct/sqltypes"
26+
"github.com/Bill-cc/go-sql2struct/sqltypes"
2727

28-
"go-sql2struct/vterrors"
28+
"github.com/Bill-cc/go-sql2struct/vterrors"
2929

30-
vtrpcpb "go-sql2struct/proto/vtrpc"
30+
vtrpcpb "github.com/Bill-cc/go-sql2struct/proto/vtrpc"
3131
)
3232

3333
// StatementType encodes the type of a SQL statement

analyzer_test.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,11 @@ package sqlparser
1919
import (
2020
"testing"
2121

22+
"github.com/Bill-cc/go-sql2struct/test/utils"
23+
2224
"github.com/stretchr/testify/require"
23-
"go-sql2struct/test/utils"
2425

25-
"go-sql2struct/sqltypes"
26+
"github.com/Bill-cc/go-sql2struct/sqltypes"
2627

2728
"github.com/stretchr/testify/assert"
2829
)

ast.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
"fmt"
2121
"strings"
2222

23-
"go-sql2struct/sqltypes"
23+
"github.com/Bill-cc/go-sql2struct/sqltypes"
2424
)
2525

2626
/*

ast_funcs.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ import (
2121
"encoding/json"
2222
"strings"
2323

24-
"go-sql2struct/visitorgen/log"
24+
"github.com/Bill-cc/go-sql2struct/visitorgen/log"
2525

26-
"go-sql2struct/sqltypes"
26+
"github.com/Bill-cc/go-sql2struct/sqltypes"
2727

28-
querypb "go-sql2struct/proto/query"
28+
querypb "github.com/Bill-cc/go-sql2struct/proto/query"
2929
)
3030

3131
// Walk calls visit on every node.

ast_rewriting.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ limitations under the License.
1717
package sqlparser
1818

1919
import (
20-
querypb "go-sql2struct/proto/query"
20+
querypb "github.com/Bill-cc/go-sql2struct/proto/query"
2121

22-
vtrpcpb "go-sql2struct/proto/vtrpc"
23-
"go-sql2struct/vterrors"
22+
vtrpcpb "github.com/Bill-cc/go-sql2struct/proto/vtrpc"
23+
"github.com/Bill-cc/go-sql2struct/vterrors"
2424
)
2525

2626
// RewriteASTResult contains the rewritten ast and meta information about it

encodable.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ package sqlparser
1919
import (
2020
"strings"
2121

22-
"go-sql2struct/sqltypes"
22+
"github.com/Bill-cc/go-sql2struct/sqltypes"
2323
)
2424

2525
// This file contains types that are 'Encodable'.

encodable_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
"strings"
2121
"testing"
2222

23-
"go-sql2struct/sqltypes"
23+
"github.com/Bill-cc/go-sql2struct/sqltypes"
2424
)
2525

2626
func TestEncodable(t *testing.T) {

evalengine/arithmetic.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ import (
2121
"fmt"
2222
"math"
2323

24-
"go-sql2struct/sqltypes"
24+
"github.com/Bill-cc/go-sql2struct/sqltypes"
2525

2626
"strconv"
2727

28-
querypb "go-sql2struct/proto/query"
29-
vtrpcpb "go-sql2struct/proto/vtrpc"
28+
querypb "github.com/Bill-cc/go-sql2struct/proto/query"
29+
vtrpcpb "github.com/Bill-cc/go-sql2struct/proto/vtrpc"
3030

31-
"go-sql2struct/vterrors"
31+
"github.com/Bill-cc/go-sql2struct/vterrors"
3232
)
3333

3434
// evalengine represents a numeric value extracted from

evalengine/arithmetic_test.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,17 @@ import (
2424
"strconv"
2525
"testing"
2626

27-
"go-sql2struct/test/utils"
27+
"github.com/Bill-cc/go-sql2struct/test/utils"
2828

2929
"github.com/stretchr/testify/assert"
3030
"github.com/stretchr/testify/require"
3131

32-
"go-sql2struct/sqltypes"
32+
"github.com/Bill-cc/go-sql2struct/sqltypes"
3333

34-
querypb "go-sql2struct/proto/query"
35-
vtrpcpb "go-sql2struct/proto/vtrpc"
34+
querypb "github.com/Bill-cc/go-sql2struct/proto/query"
35+
vtrpcpb "github.com/Bill-cc/go-sql2struct/proto/vtrpc"
3636

37-
"go-sql2struct/vterrors"
37+
"github.com/Bill-cc/go-sql2struct/vterrors"
3838
)
3939

4040
var (

evalengine/casting.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ package evalengine
1919
import (
2020
"strings"
2121

22-
"go-sql2struct/sqltypes"
22+
"github.com/Bill-cc/go-sql2struct/sqltypes"
2323

24-
vtrpcpb "go-sql2struct/proto/vtrpc"
25-
"go-sql2struct/vterrors"
24+
vtrpcpb "github.com/Bill-cc/go-sql2struct/proto/vtrpc"
25+
"github.com/Bill-cc/go-sql2struct/vterrors"
2626
)
2727

2828
//ToBooleanStrict is used when the casting to a boolean has to be minimally forgiving,

evalengine/casting_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
"fmt"
2121
"testing"
2222

23-
"go-sql2struct/sqltypes"
23+
"github.com/Bill-cc/go-sql2struct/sqltypes"
2424

2525
"github.com/stretchr/testify/require"
2626
)

evalengine/evalengine.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ limitations under the License.
1717
package evalengine
1818

1919
import (
20-
"go-sql2struct/sqltypes"
20+
"github.com/Bill-cc/go-sql2struct/sqltypes"
2121

2222
"strconv"
2323

24-
querypb "go-sql2struct/proto/query"
25-
vtrpcpb "go-sql2struct/proto/vtrpc"
26-
"go-sql2struct/vterrors"
24+
querypb "github.com/Bill-cc/go-sql2struct/proto/query"
25+
vtrpcpb "github.com/Bill-cc/go-sql2struct/proto/vtrpc"
26+
"github.com/Bill-cc/go-sql2struct/vterrors"
2727
)
2828

2929
// Cast converts a Value to the target type.

evalengine/expressions.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ import (
2020
"fmt"
2121
"strconv"
2222

23-
"go-sql2struct/sqltypes"
23+
"github.com/Bill-cc/go-sql2struct/sqltypes"
2424

25-
querypb "go-sql2struct/proto/query"
26-
vtrpcpb "go-sql2struct/proto/vtrpc"
27-
"go-sql2struct/vterrors"
25+
querypb "github.com/Bill-cc/go-sql2struct/proto/query"
26+
vtrpcpb "github.com/Bill-cc/go-sql2struct/proto/vtrpc"
27+
"github.com/Bill-cc/go-sql2struct/vterrors"
2828
)
2929

3030
type (

evalengine/expressions_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ import (
2323

2424
"github.com/stretchr/testify/assert"
2525

26-
"go-sql2struct/sqltypes"
26+
"github.com/Bill-cc/go-sql2struct/sqltypes"
2727

28-
querypb "go-sql2struct/proto/query"
28+
querypb "github.com/Bill-cc/go-sql2struct/proto/query"
2929
)
3030

3131
// more tests in go/sqlparser/expressions_test.go

expression_converter.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ package sqlparser
1919
import (
2020
"fmt"
2121

22-
"go-sql2struct/evalengine"
22+
"github.com/Bill-cc/go-sql2struct/evalengine"
2323
)
2424

2525
// ErrExprNotSupported signals that the expression cannot be handled by expression evaluation engine.

expression_rewriting.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ package sqlparser
1919
import (
2020
"strings"
2121

22-
"go-sql2struct/sysvars"
22+
"github.com/Bill-cc/go-sql2struct/sysvars"
2323

24-
"go-sql2struct/proto/vtrpc"
25-
"go-sql2struct/vterrors"
24+
"github.com/Bill-cc/go-sql2struct/proto/vtrpc"
25+
"github.com/Bill-cc/go-sql2struct/vterrors"
2626
)
2727

2828
func shouldRewriteDatabaseFunc(in Statement) bool {

expression_rewriting_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ package sqlparser
1919
import (
2020
"testing"
2121

22-
"go-sql2struct/sysvars"
22+
"github.com/Bill-cc/go-sql2struct/sysvars"
2323

2424
"github.com/stretchr/testify/assert"
2525

expressions_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ package sqlparser
1919
import (
2020
"testing"
2121

22-
"go-sql2struct/evalengine"
22+
"github.com/Bill-cc/go-sql2struct/evalengine"
2323

24-
"go-sql2struct/sqltypes"
24+
"github.com/Bill-cc/go-sql2struct/sqltypes"
2525

26-
querypb "go-sql2struct/proto/query"
26+
querypb "github.com/Bill-cc/go-sql2struct/proto/query"
2727

2828
"github.com/stretchr/testify/assert"
2929
"github.com/stretchr/testify/require"

go.mod

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
module go-sql2struct
1+
module github.com/Bill-cc/go-sql2struct
22

33
go 1.15
44

55
require (
66
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b
77
github.com/golang/protobuf v1.4.3
8+
github.com/google/go-cmp v0.5.0
9+
github.com/stretchr/testify v1.6.1
810
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b
911
google.golang.org/grpc v1.33.2
1012
)

go.sum

+11
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03
33
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
44
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
55
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
6+
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
7+
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
68
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
79
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
810
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
@@ -24,9 +26,15 @@ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5a
2426
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
2527
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
2628
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
29+
github.com/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w=
2730
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
2831
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
32+
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
33+
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
2934
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
35+
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
36+
github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
37+
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
3038
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
3139
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
3240
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
@@ -78,5 +86,8 @@ google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2
7886
google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
7987
google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c=
8088
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
89+
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
90+
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
91+
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
8192
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
8293
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=

normalizer.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ package sqlparser
1919
import (
2020
"strconv"
2121

22-
"go-sql2struct/sqltypes"
22+
"github.com/Bill-cc/go-sql2struct/sqltypes"
2323

24-
querypb "go-sql2struct/proto/query"
24+
querypb "github.com/Bill-cc/go-sql2struct/proto/query"
2525
)
2626

2727
// Normalize changes the statement to use bind values, and

normalizer_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ import (
2121
"reflect"
2222
"testing"
2323

24-
"go-sql2struct/sqltypes"
24+
"github.com/Bill-cc/go-sql2struct/sqltypes"
2525

26-
querypb "go-sql2struct/proto/query"
26+
querypb "github.com/Bill-cc/go-sql2struct/proto/query"
2727
)
2828

2929
func TestNormalize(t *testing.T) {

parse_table.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ limitations under the License.
1717
package sqlparser
1818

1919
import (
20-
vtrpcpb "go-sql2struct/proto/vtrpc"
21-
"go-sql2struct/vterrors"
20+
vtrpcpb "github.com/Bill-cc/go-sql2struct/proto/vtrpc"
21+
"github.com/Bill-cc/go-sql2struct/vterrors"
2222
)
2323

2424
// ParseTable parses the input as a qualified table name.

parsed_query.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ import (
2121
"fmt"
2222
"strings"
2323

24-
"go-sql2struct/sqltypes"
24+
"github.com/Bill-cc/go-sql2struct/sqltypes"
2525

26-
querypb "go-sql2struct/proto/query"
26+
querypb "github.com/Bill-cc/go-sql2struct/proto/query"
2727
)
2828

2929
// ParsedQuery represents a parsed query where

parsed_query_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ import (
2020
"reflect"
2121
"testing"
2222

23-
"go-sql2struct/sqltypes"
23+
"github.com/Bill-cc/go-sql2struct/sqltypes"
2424

25-
querypb "go-sql2struct/proto/query"
25+
querypb "github.com/Bill-cc/go-sql2struct/proto/query"
2626
)
2727

2828
func TestNewParsedQuery(t *testing.T) {

parser.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ import (
2323
"runtime/debug"
2424
"sync"
2525

26-
"go-sql2struct/visitorgen/log"
27-
"go-sql2struct/vterrors"
26+
"github.com/Bill-cc/go-sql2struct/visitorgen/log"
27+
"github.com/Bill-cc/go-sql2struct/vterrors"
2828

29-
vtrpcpb "go-sql2struct/proto/vtrpc"
29+
vtrpcpb "github.com/Bill-cc/go-sql2struct/proto/vtrpc"
3030
)
3131

3232
// parserPool is a pool for parser objects.

proto/query/query.pb.go

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

proto/topodata/topodata.pb.go

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

redact_query.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ limitations under the License.
1616

1717
package sqlparser
1818

19-
import querypb "go-sql2struct/proto/query"
19+
import querypb "github.com/Bill-cc/go-sql2struct/proto/query"
2020

2121
// RedactSQLQuery returns a sql string with the params stripped out for display
2222
func RedactSQLQuery(sql string) (string, error) {

0 commit comments

Comments
 (0)