mirror of
https://github.com/go-gitea/gitea
synced 2025-07-15 23:17:19 +00:00
Fix label count (#8267)
* fix label count * fix vendor * fix import order * update xorm to fix bug * fix tests * fix mssql bug
This commit is contained in:
36
vendor/xorm.io/builder/cond.go
generated
vendored
36
vendor/xorm.io/builder/cond.go
generated
vendored
@@ -4,42 +4,6 @@
|
||||
|
||||
package builder
|
||||
|
||||
import (
|
||||
"io"
|
||||
)
|
||||
|
||||
// Writer defines the interface
|
||||
type Writer interface {
|
||||
io.Writer
|
||||
Append(...interface{})
|
||||
}
|
||||
|
||||
var _ Writer = NewWriter()
|
||||
|
||||
// BytesWriter implments Writer and save SQL in bytes.Buffer
|
||||
type BytesWriter struct {
|
||||
writer *StringBuilder
|
||||
args []interface{}
|
||||
}
|
||||
|
||||
// NewWriter creates a new string writer
|
||||
func NewWriter() *BytesWriter {
|
||||
w := &BytesWriter{
|
||||
writer: &StringBuilder{},
|
||||
}
|
||||
return w
|
||||
}
|
||||
|
||||
// Write writes data to Writer
|
||||
func (s *BytesWriter) Write(buf []byte) (int, error) {
|
||||
return s.writer.Write(buf)
|
||||
}
|
||||
|
||||
// Append appends args to Writer
|
||||
func (s *BytesWriter) Append(args ...interface{}) {
|
||||
s.args = append(s.args, args...)
|
||||
}
|
||||
|
||||
// Cond defines an interface
|
||||
type Cond interface {
|
||||
WriteTo(Writer) error
|
||||
|
Reference in New Issue
Block a user