fix: update vendor 20211121 (#12718)

Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
This commit is contained in:
Jian Qiu
2021-11-21 10:01:18 +08:00
committed by GitHub
co-authored by Qiu Jian
parent a945095772
commit 9cc9fd0872
5 changed files with 21 additions and 11 deletions
+1 -1
View File
@@ -157,6 +157,6 @@ require (
yunion.io/x/ovsdb v0.0.0-20200526071744-27bf0940cbc7
yunion.io/x/pkg v0.0.0-20211116020154-6a76ba2f7e97
yunion.io/x/s3cli v0.0.0-20190917004522-13ac36d8687e
yunion.io/x/sqlchemy v0.0.0-20211116231750-5ec40db49db1
yunion.io/x/sqlchemy v0.0.0-20211121015201-266a5b1a8f5c
yunion.io/x/structarg v0.0.0-20200720093445-9f850fa222ce
)
+2 -2
View File
@@ -955,7 +955,7 @@ yunion.io/x/pkg v0.0.0-20211116020154-6a76ba2f7e97 h1:lY+5NlWwO2aIkfNnVOGKHmZvMt
yunion.io/x/pkg v0.0.0-20211116020154-6a76ba2f7e97/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-20211116231750-5ec40db49db1 h1:WxvTLANfa01EFTORGY2GapbdjQkuLaQ/CwMDdBy632U=
yunion.io/x/sqlchemy v0.0.0-20211116231750-5ec40db49db1/go.mod h1:FTdwPdGhMgh4E+UFXc9klI1Ok34fMuybTT+jLhOaIjI=
yunion.io/x/sqlchemy v0.0.0-20211121015201-266a5b1a8f5c h1:nnYn2VBFwwrAx6HuUN6Lv+BKxtBnOSPGWUWGvdeuUr4=
yunion.io/x/sqlchemy v0.0.0-20211121015201-266a5b1a8f5c/go.mod h1:FTdwPdGhMgh4E+UFXc9klI1Ok34fMuybTT+jLhOaIjI=
yunion.io/x/structarg v0.0.0-20200720093445-9f850fa222ce h1:kU8xE7O5uZ1GSJVMZHoJ+jrNL7csUQHYGyAPW9QfNpE=
yunion.io/x/structarg v0.0.0-20200720093445-9f850fa222ce/go.mod h1:EP6NSv2C0zzqBDTKumv8hPWLb3XvgMZDHQRfyuOrQng=
+1 -1
View File
@@ -1223,7 +1223,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-20211116231750-5ec40db49db1
# yunion.io/x/sqlchemy v0.0.0-20211121015201-266a5b1a8f5c
yunion.io/x/sqlchemy
yunion.io/x/sqlchemy/backends
yunion.io/x/sqlchemy/backends/clickhouse
+5 -5
View File
@@ -11,8 +11,8 @@ Features
* Automatic creation and synchronization of table schema based on golang struct
* Query syntax inpired by sqlalchemy
* Support: MySQL/MariaDB with InnoDB engine/SQLITE(Exprimental)/ClickHouse(Exprimental)
* Support select, insert, update and insert or update
* Support: MySQL/MariaDB with InnoDB engine / Sqlite (Exprimental) / ClickHouse (Exprimental)
* Support select, insert, update and insertOrupdate (no delete)
Quick Examples
----------------
@@ -29,7 +29,7 @@ dbconn := sql.Open("mysql", "testgo:openstack@tcp(127.0.0.1:3306)/testgo?charset
sqlchemy.SetDefaultDB(dbconn)
```
### Setup database with MySQL with InnoDB
### Setup database with MySQL with InnoDB explicitly
```go
dbconn := sql.Open("mysql", "testgo:openstack@tcp(127.0.0.1:3306)/testgo?charset=utf8&parseTime")
@@ -44,7 +44,7 @@ dbconn := sql.Open("sqlite3", "file:mydb.s3db?cache=shared&mode=rwc")
sqlchemy.SetDBWithNameBackend(dbconn, sqlchemy.DBName("sqlitedb"), sqlchemy.SQLiteBackend)
```
### Setup database with clickhosue
### Setup database with ClickHouse
```go
dbconn := sql.Open("clickhouse", "tcp://host1:9000?username=user&password=qwerty&database=clicks")
@@ -71,7 +71,7 @@ type TestTable struct {
Deleted bool `nullable:"false" default:"false"`
Notes string `default:"default notes"`
}
````
```
## Table initialization
+12 -2
View File
@@ -157,7 +157,12 @@ type SConstField struct {
// Expression implementation of SConstField for IQueryField
func (s *SConstField) Expression() string {
return fmt.Sprintf("%s AS `%s`", s.Reference(), s.Name())
name := s.Name()
if len(name) == 0 {
return s.Reference()
} else {
return fmt.Sprintf("%s AS `%s`", s.Reference(), name)
}
}
// Name implementation of SConstField for IQueryField
@@ -196,7 +201,12 @@ type SStringField struct {
// Expression implementation of SStringField for IQueryField
func (s *SStringField) Expression() string {
return fmt.Sprintf("%s AS `%s`", s.Reference(), s.Name())
name := s.Name()
if len(name) == 0 {
return s.Reference()
} else {
return fmt.Sprintf("%s AS `%s`", s.Reference(), name)
}
}
// Name implementation of SStringField for IQueryField