Skip to content

Commit

Permalink
updated dep
Browse files Browse the repository at this point in the history
  • Loading branch information
adranwit committed Jul 24, 2024
1 parent df4841a commit 8938a04
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 6 deletions.
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ require (
github.com/viant/godiff v0.4.1
github.com/viant/parsly v0.3.3-0.20240717150634-e1afaedb691b
github.com/viant/pgo v0.11.0
github.com/viant/scy v0.9.1
github.com/viant/scy v0.10.0
github.com/viant/sqlx v0.14.1-0.20240724211303-844af16823da
github.com/viant/structql v0.4.2-0.20240712002135-b1ef22dd834f
github.com/viant/toolbox v0.36.0
Expand All @@ -54,9 +54,9 @@ require (
github.com/viant/aerospike v0.1.0
github.com/viant/structology v0.5.6-0.20240724183243-379c7ed6e097
github.com/viant/tagly v0.2.1-0.20240521205717-55de744e893c
github.com/viant/xdatly v0.3.1-0.20240710035338-b561698d2bf4
github.com/viant/xdatly v0.3.1-0.20240724214307-abece0437c33
github.com/viant/xdatly/extension v0.0.0-20231013204918-ecf3c2edf259
github.com/viant/xdatly/handler v0.0.0-20240710035338-b561698d2bf4
github.com/viant/xdatly/handler v0.0.0-20240724214307-abece0437c33
github.com/viant/xdatly/types/core v0.0.0-20240109065401-9758ebacb4bb
github.com/viant/xdatly/types/custom v0.0.0-20240624200855-79bbed0d3db9
github.com/viant/xlsy v0.3.0
Expand Down
6 changes: 6 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1120,6 +1120,8 @@ github.com/viant/pgo v0.11.0 h1:PNuYVhwTfyrAHGBO6lxaMFuHP4NkjKV8ULecz3OWk8c=
github.com/viant/pgo v0.11.0/go.mod h1:MFzHmkRFZlciugEgUvpl/3grK789PBSH4dUVSLOSo+Q=
github.com/viant/scy v0.9.1 h1:tRNgHkX5JwscIZ0c/1zrHCzyyMc5bS+kNLTHoemwWzk=
github.com/viant/scy v0.9.1/go.mod h1:vXJWbdyy66rDS2VXSznBnFy3bPV+WVjkhKd/R2yuMdA=
github.com/viant/scy v0.10.0 h1:uw13kR0qY98SkR9RoIjhJiRnF5oK1VKQUv/RxOc3s58=
github.com/viant/scy v0.10.0/go.mod h1:Lz1VPlmjVi4ydZ5ikP/d5uQS/xYs22HG23++PgLRlKQ=
github.com/viant/sqlparser v0.7.1-0.20240717151907-216ea35d127a h1:2ijg6j7HlXU6S1gHAfWPLJ7x4Dqo1OgIlJU2niKK59s=
github.com/viant/sqlparser v0.7.1-0.20240717151907-216ea35d127a/go.mod h1:2QRGiGZYk2/pjhORGG1zLVQ9JO+bXFhqIVi31mkCRPg=
github.com/viant/sqlx v0.12.1-0.20240613223731-980e9de11f2f h1:24wEZ4qpkz2Pw4/CDzV3XLCkvof+RtSzI0jC462ySKA=
Expand All @@ -1146,10 +1148,14 @@ github.com/viant/x v0.3.0 h1:/3A0z/uySGxMo6ixH90VAcdjI00w5e3REC1zg5hzhJA=
github.com/viant/x v0.3.0/go.mod h1:54jP3qV+nnQdNDaWxEwGTAAzCu9sx9er9htiwTW/Mcw=
github.com/viant/xdatly v0.3.1-0.20240710035338-b561698d2bf4 h1:e9Lz9ebRr/bu71yPx2WC9VzXA2Q64rskNwliuQbKlKY=
github.com/viant/xdatly v0.3.1-0.20240710035338-b561698d2bf4/go.mod h1:YwNS31k5r1Ldw5s7wmQXUKaalN6BWcfX9qePO/b/ilc=
github.com/viant/xdatly v0.3.1-0.20240724214307-abece0437c33 h1:uw3WRYL6voRSFjsPtDf0Ne6RzbjGvEZezblwa4GZKgg=
github.com/viant/xdatly v0.3.1-0.20240724214307-abece0437c33/go.mod h1:YwNS31k5r1Ldw5s7wmQXUKaalN6BWcfX9qePO/b/ilc=
github.com/viant/xdatly/extension v0.0.0-20231013204918-ecf3c2edf259 h1:9Yry3PUBDzc4rWacOYvAq/TKrTV0agvMF0gwm2gaoHI=
github.com/viant/xdatly/extension v0.0.0-20231013204918-ecf3c2edf259/go.mod h1:fb8YgbVadk8X5ZLz49LWGzWmQlZd7Y/I5wE0ru44bIo=
github.com/viant/xdatly/handler v0.0.0-20240710035338-b561698d2bf4 h1:JaEVpYI0lLFPJfm3sh3M3uyGakd2uoUOHX14mzePIO0=
github.com/viant/xdatly/handler v0.0.0-20240710035338-b561698d2bf4/go.mod h1:bBa479sCB55VymMrXFccluUFkf6oRI77xhtnWIcL8K0=
github.com/viant/xdatly/handler v0.0.0-20240724214307-abece0437c33 h1:wc/YJ5OGdoohEa2XFRFizmDaiumIbLJjTShBBmKBioE=
github.com/viant/xdatly/handler v0.0.0-20240724214307-abece0437c33/go.mod h1:bBa479sCB55VymMrXFccluUFkf6oRI77xhtnWIcL8K0=
github.com/viant/xdatly/types/core v0.0.0-20240109065401-9758ebacb4bb h1:X4emK6TIR6IXiFlQz9wEdCi5RJMG3dg3e8+VLQ2zhnM=
github.com/viant/xdatly/types/core v0.0.0-20240109065401-9758ebacb4bb/go.mod h1:LJN2m8xJjtYNCvyvNrVanJwvzj8+hYCuPswL8H4qRG0=
github.com/viant/xdatly/types/custom v0.0.0-20240624200855-79bbed0d3db9 h1:+wndga8eeCHI9NWUmX2/bpn16pbwK06ezC8drBmZAKw=
Expand Down
17 changes: 14 additions & 3 deletions service/executor/extension/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,21 @@ func (v *Validator) validateWithGoValidator(ctx context.Context, any interface{}
func (v *Validator) validateWithSqlx(ctx context.Context, any interface{}, validation *validator.Validation, options *validator.Options) error {
db := options.WithDB
if db != nil {
var sqlxOptions = []sqlxvalidator.Option{
sqlxvalidator.WithUnique(true),
sqlxvalidator.WithRef(true),
var sqlxOptions []sqlxvalidator.Option
if options.WithUnique {
sqlxOptions = append(sqlxOptions, sqlxvalidator.WithUnique(true))
}
if options.WithRef {
sqlxOptions = append(sqlxOptions, sqlxvalidator.WithRef(true))
}

if len(sqlxOptions) == 0 {
return nil
}
if options.Location != "" {
sqlxOptions = append(sqlxOptions, sqlxvalidator.WithLocation(options.Location))
}

if options.WithSetMarker {
sqlxOptions = append(sqlxOptions, sqlxvalidator.WithSetMarker())
}
Expand Down

0 comments on commit 8938a04

Please sign in to comment.