mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #5464 from rainzm/feat/vendor_update
feat: Update Vendor
This commit is contained in:
@@ -142,9 +142,9 @@ require (
|
||||
yunion.io/x/executor v0.0.0-20200227030256-a18417815e74
|
||||
yunion.io/x/jsonutils v0.0.0-20200303051356-aa609aba0cda
|
||||
yunion.io/x/log v0.0.0-20190629062853-9f6483a7103d
|
||||
yunion.io/x/pkg v0.0.0-20200302034534-fdf44d54b070
|
||||
yunion.io/x/pkg v0.0.0-20200304112442-9dae9351325e
|
||||
yunion.io/x/s3cli v0.0.0-20190917004522-13ac36d8687e
|
||||
yunion.io/x/sqlchemy v0.0.0-20200303101347-d1e82c81b4e1
|
||||
yunion.io/x/sqlchemy v0.0.0-20200312002602-1177cd8fbc57
|
||||
yunion.io/x/structarg v0.0.0-20190809075558-115bed041de3
|
||||
)
|
||||
|
||||
|
||||
@@ -837,9 +837,13 @@ yunion.io/x/pkg v0.0.0-20190620104149-945c25821dbf/go.mod h1:t6rEGG2sQ4J7DhFxSZV
|
||||
yunion.io/x/pkg v0.0.0-20190628082551-f4033ba2ea30/go.mod h1:t6rEGG2sQ4J7DhFxSZVOTjNd0YO/KlfWQyK1W4tog+E=
|
||||
yunion.io/x/pkg v0.0.0-20200302034534-fdf44d54b070 h1:rKnYgtvMHKmzPEUTkyNjyKOG7wzjpUvI7fcZwLNGQXw=
|
||||
yunion.io/x/pkg v0.0.0-20200302034534-fdf44d54b070/go.mod h1:t6rEGG2sQ4J7DhFxSZVOTjNd0YO/KlfWQyK1W4tog+E=
|
||||
yunion.io/x/pkg v0.0.0-20200304112442-9dae9351325e h1:rBfX77+VEBVpe6Xxy2gDa4WB7qbtndWvXcrVKzleF84=
|
||||
yunion.io/x/pkg v0.0.0-20200304112442-9dae9351325e/go.mod h1:t6rEGG2sQ4J7DhFxSZVOTjNd0YO/KlfWQyK1W4tog+E=
|
||||
yunion.io/x/s3cli v0.0.0-20190917004522-13ac36d8687e h1:v+EzIadodSwkdZ/7bremd7J8J50Cise/HCylsOJngmo=
|
||||
yunion.io/x/s3cli v0.0.0-20190917004522-13ac36d8687e/go.mod h1:0iFKpOs1y4lbCxeOmq3Xx/0AcQoewVPwj62eRluioEo=
|
||||
yunion.io/x/sqlchemy v0.0.0-20200303101347-d1e82c81b4e1 h1:OJrTCU1YooMykhSIsYvvJsOE+BdXIVXf4LgfDP7mibE=
|
||||
yunion.io/x/sqlchemy v0.0.0-20200303101347-d1e82c81b4e1/go.mod h1:FTdwPdGhMgh4E+UFXc9klI1Ok34fMuybTT+jLhOaIjI=
|
||||
yunion.io/x/sqlchemy v0.0.0-20200312002602-1177cd8fbc57 h1:KtQAuLJ00RSUVqkiRmJ1DiDABiw0U3xxXnzD3lGavaY=
|
||||
yunion.io/x/sqlchemy v0.0.0-20200312002602-1177cd8fbc57/go.mod h1:FTdwPdGhMgh4E+UFXc9klI1Ok34fMuybTT+jLhOaIjI=
|
||||
yunion.io/x/structarg v0.0.0-20190809075558-115bed041de3 h1:bfC8EhXYvyGYldRWlzxiCM39Zfj3s3+zham9mW2h2LE=
|
||||
yunion.io/x/structarg v0.0.0-20190809075558-115bed041de3/go.mod h1:EP6NSv2C0zzqBDTKumv8hPWLb3XvgMZDHQRfyuOrQng=
|
||||
|
||||
Vendored
+2
-2
@@ -979,7 +979,7 @@ yunion.io/x/jsonutils
|
||||
# yunion.io/x/log v0.0.0-20190629062853-9f6483a7103d
|
||||
yunion.io/x/log
|
||||
yunion.io/x/log/hooks
|
||||
# yunion.io/x/pkg v0.0.0-20200302034534-fdf44d54b070
|
||||
# yunion.io/x/pkg v0.0.0-20200304112442-9dae9351325e
|
||||
yunion.io/x/pkg/errors
|
||||
yunion.io/x/pkg/gotypes
|
||||
yunion.io/x/pkg/prettytable
|
||||
@@ -1011,7 +1011,7 @@ yunion.io/x/pkg/util/workqueue
|
||||
yunion.io/x/pkg/utils
|
||||
# yunion.io/x/s3cli v0.0.0-20190917004522-13ac36d8687e
|
||||
yunion.io/x/s3cli
|
||||
# yunion.io/x/sqlchemy v0.0.0-20200303101347-d1e82c81b4e1
|
||||
# yunion.io/x/sqlchemy v0.0.0-20200312002602-1177cd8fbc57
|
||||
yunion.io/x/sqlchemy
|
||||
# yunion.io/x/structarg v0.0.0-20190809075558-115bed041de3
|
||||
yunion.io/x/structarg
|
||||
|
||||
+6
-2
@@ -63,13 +63,17 @@ func (s SStructFieldInfo) deepCopy() *SStructFieldInfo {
|
||||
}
|
||||
|
||||
func ParseStructFieldJsonInfo(sf reflect.StructField) SStructFieldInfo {
|
||||
return ParseFieldJsonInfo(sf.Name, sf.Tag)
|
||||
}
|
||||
|
||||
func ParseFieldJsonInfo(name string, tag reflect.StructTag) SStructFieldInfo {
|
||||
info := SStructFieldInfo{}
|
||||
info.FieldName = sf.Name
|
||||
info.FieldName = name
|
||||
info.OmitEmpty = true
|
||||
info.OmitZero = false
|
||||
info.OmitFalse = false
|
||||
|
||||
info.Tags = utils.TagMap(sf.Tag)
|
||||
info.Tags = utils.TagMap(tag)
|
||||
if val, ok := info.Tags["json"]; ok {
|
||||
keys := strings.Split(val, ",")
|
||||
if len(keys) > 0 {
|
||||
|
||||
+2
-2
@@ -123,9 +123,9 @@ type SSubQueryField struct {
|
||||
|
||||
func (sqf *SSubQueryField) Expression() string {
|
||||
if len(sqf.alias) > 0 {
|
||||
return fmt.Sprintf("%s.%s AS %s", sqf.query.alias, sqf.field.Name(), sqf.alias)
|
||||
return fmt.Sprintf("`%s`.`%s` AS `%s`", sqf.query.alias, sqf.field.Name(), sqf.alias)
|
||||
} else {
|
||||
return fmt.Sprintf("%s.%s", sqf.query.alias, sqf.field.Name())
|
||||
return fmt.Sprintf("`%s`.`%s`", sqf.query.alias, sqf.field.Name())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-7
@@ -105,7 +105,7 @@ func (us *SUpdateSession) saveUpdate(dt interface{}) (UpdateDiffs, error) {
|
||||
nf, _ := fields.GetInterface(k)
|
||||
if c.IsPrimary() {
|
||||
if !gotypes.IsNil(of) && !c.IsZero(of) {
|
||||
primaries[k] = of
|
||||
primaries[k] = c.ConvertFromValue(of)
|
||||
} else if c.IsText() {
|
||||
primaries[k] = ""
|
||||
} else {
|
||||
@@ -113,12 +113,6 @@ func (us *SUpdateSession) saveUpdate(dt interface{}) (UpdateDiffs, error) {
|
||||
}
|
||||
continue
|
||||
}
|
||||
if !gotypes.IsNil(of) {
|
||||
if c.IsPrimary() && !c.IsZero(of) { // skip update primary key
|
||||
primaries[k] = of
|
||||
continue
|
||||
}
|
||||
}
|
||||
nc, ok := c.(*SIntegerColumn)
|
||||
if ok && nc.IsAutoVersion {
|
||||
versionFields = append(versionFields, k)
|
||||
|
||||
Reference in New Issue
Block a user