devops tenant api

Signed-off-by: runzexia <runzexia@yunify.com>
This commit is contained in:
runzexia
2019-04-23 20:47:47 +08:00
committed by zryfish
parent 78f2dab18c
commit 5a6f51d775
143 changed files with 19533 additions and 341 deletions

41
vendor/github.com/gocraft/dbr/join.go generated vendored Normal file
View File

@@ -0,0 +1,41 @@
package dbr
type joinType uint8
const (
inner joinType = iota
left
right
full
)
func join(t joinType, table interface{}, on interface{}) Builder {
return BuildFunc(func(d Dialect, buf Buffer) error {
buf.WriteString(" ")
switch t {
case left:
buf.WriteString("LEFT ")
case right:
buf.WriteString("RIGHT ")
case full:
buf.WriteString("FULL ")
}
buf.WriteString("JOIN ")
switch table := table.(type) {
case string:
buf.WriteString(d.QuoteIdent(table))
default:
buf.WriteString(placeholder)
buf.WriteValue(table)
}
buf.WriteString(" ON ")
switch on := on.(type) {
case string:
buf.WriteString(on)
case Builder:
buf.WriteString(placeholder)
buf.WriteValue(on)
}
return nil
})
}