Note: We keep splitio/go-client untouched
because the dependency is broken.

See https://github.com/mattermost/mattermost-server/pull/18604

```release-note
NONE
```
Этот коммит содержится в:
Agniva De Sarker
2021-11-24 19:45:28 +05:30
коммит произвёл GitHub
родитель fd8fea804b
Коммит 189d447591
362 изменённых файлов: 66284 добавлений и 19348 удалений

4
vendor/github.com/Masterminds/squirrel/README.md сгенерированный поставляемый
Просмотреть файл

@@ -1,4 +1,4 @@
[![Project Status: Inactive – The project has reached a stable, usable state but is no longer being actively developed; support/maintenance will be provided as time allows.](https://www.repostatus.org/badges/latest/inactive.svg)](https://www.repostatus.org/#inactive)
[![Stability: Maintenance](https://masterminds.github.io/stability/maintenance.svg)](https://masterminds.github.io/stability/maintenance.html)
### Squirrel is "complete".
Bug fixes will still be merged (slowly). Bug reports are welcome, but I will not necessarily respond to them. If another fork (or substantially similar project) actively improves on what Squirrel does, let me know and I may link to it here.
@@ -64,7 +64,7 @@ Squirrel wants to make your life easier:
```go
// StmtCache caches Prepared Stmts for you
dbCache := sq.NewStmtCacher(db)
dbCache := sq.NewStmtCache(db)
// StatementBuilder keeps your syntax neat
mydb := sq.StatementBuilder.RunWith(dbCache)

12
vendor/github.com/Masterminds/squirrel/case.go сгенерированный поставляемый
Просмотреть файл

@@ -27,7 +27,7 @@ func (b *sqlizerBuffer) WriteSql(item Sqlizer) {
var str string
var args []interface{}
str, args, b.err = item.ToSql()
str, args, b.err = nestedToSql(item)
if b.err != nil {
return
@@ -100,6 +100,16 @@ func (b CaseBuilder) ToSql() (string, []interface{}, error) {
return data.ToSql()
}
// MustSql builds the query into a SQL string and bound args.
// It panics if there are any errors.
func (b CaseBuilder) MustSql() (string, []interface{}) {
sql, args, err := b.ToSql()
if err != nil {
panic(err)
}
return sql, args
}
// what sets optional value for CASE construct "CASE [value] ..."
func (b CaseBuilder) what(expr interface{}) CaseBuilder {
return builder.Set(b, "What", newPart(expr)).(CaseBuilder)

10
vendor/github.com/Masterminds/squirrel/delete.go сгенерированный поставляемый
Просмотреть файл

@@ -121,6 +121,16 @@ func (b DeleteBuilder) ToSql() (string, []interface{}, error) {
return data.ToSql()
}
// MustSql builds the query into a SQL string and bound args.
// It panics if there are any errors.
func (b DeleteBuilder) MustSql() (string, []interface{}) {
sql, args, err := b.ToSql()
if err != nil {
panic(err)
}
return sql, args
}
// Prefix adds an expression to the beginning of the query
func (b DeleteBuilder) Prefix(sql string, args ...interface{}) DeleteBuilder {
return b.PrefixExpr(Expr(sql, args...))

10
vendor/github.com/Masterminds/squirrel/insert.go сгенерированный поставляемый
Просмотреть файл

@@ -216,6 +216,16 @@ func (b InsertBuilder) ToSql() (string, []interface{}, error) {
return data.ToSql()
}
// MustSql builds the query into a SQL string and bound args.
// It panics if there are any errors.
func (b InsertBuilder) MustSql() (string, []interface{}) {
sql, args, err := b.ToSql()
if err != nil {
panic(err)
}
return sql, args
}
// Prefix adds an expression to the beginning of the query
func (b InsertBuilder) Prefix(sql string, args ...interface{}) InsertBuilder {
return b.PrefixExpr(Expr(sql, args...))

10
vendor/github.com/Masterminds/squirrel/part.go сгенерированный поставляемый
Просмотреть файл

@@ -29,9 +29,17 @@ func (p part) ToSql() (sql string, args []interface{}, err error) {
return
}
func nestedToSql(s Sqlizer) (string, []interface{}, error) {
if raw, ok := s.(rawSqlizer); ok {
return raw.toSqlRaw()
} else {
return s.ToSql()
}
}
func appendToSql(parts []Sqlizer, w io.Writer, sep string, args []interface{}) ([]interface{}, error) {
for i, p := range parts {
partSql, partArgs, err := p.ToSql()
partSql, partArgs, err := nestedToSql(p)
if err != nil {
return nil, err
} else if len(partSql) == 0 {

18
vendor/github.com/Masterminds/squirrel/select.go сгенерированный поставляемый
Просмотреть файл

@@ -52,7 +52,7 @@ func (d *selectData) QueryRow() RowScanner {
}
func (d *selectData) ToSql() (sqlStr string, args []interface{}, err error) {
sqlStr, args, err = d.toSql()
sqlStr, args, err = d.toSqlRaw()
if err != nil {
return
}
@@ -62,10 +62,6 @@ func (d *selectData) ToSql() (sqlStr string, args []interface{}, err error) {
}
func (d *selectData) toSqlRaw() (sqlStr string, args []interface{}, err error) {
return d.toSql()
}
func (d *selectData) toSql() (sqlStr string, args []interface{}, err error) {
if len(d.Columns) == 0 {
err = fmt.Errorf("select statements must have at least one result column")
return
@@ -222,6 +218,13 @@ func (b SelectBuilder) ToSql() (string, []interface{}, error) {
return data.ToSql()
}
func (b SelectBuilder) toSqlRaw() (string, []interface{}, error) {
data := builder.GetStruct(b).(selectData)
return data.toSqlRaw()
}
// MustSql builds the query into a SQL string and bound args.
// It panics if there are any errors.
func (b SelectBuilder) MustSql() (string, []interface{}) {
sql, args, err := b.ToSql()
if err != nil {
@@ -230,11 +233,6 @@ func (b SelectBuilder) MustSql() (string, []interface{}) {
return sql, args
}
func (b SelectBuilder) toSqlRaw() (string, []interface{}, error) {
data := builder.GetStruct(b).(selectData)
return data.toSqlRaw()
}
// Prefix adds an expression to the beginning of the query
func (b SelectBuilder) Prefix(sql string, args ...interface{}) SelectBuilder {
return b.PrefixExpr(Expr(sql, args...))

10
vendor/github.com/Masterminds/squirrel/update.go сгенерированный поставляемый
Просмотреть файл

@@ -187,6 +187,16 @@ func (b UpdateBuilder) ToSql() (string, []interface{}, error) {
return data.ToSql()
}
// MustSql builds the query into a SQL string and bound args.
// It panics if there are any errors.
func (b UpdateBuilder) MustSql() (string, []interface{}) {
sql, args, err := b.ToSql()
if err != nil {
panic(err)
}
return sql, args
}
// Prefix adds an expression to the beginning of the query
func (b UpdateBuilder) Prefix(sql string, args ...interface{}) UpdateBuilder {
return b.PrefixExpr(Expr(sql, args...))