Modify comment syntax error (#5094)

This commit is contained in:
王哈哈
2022-11-10 18:22:37 +08:00
committed by GitHub
parent a658b9fbe0
commit 1bb607b286
16 changed files with 24 additions and 24 deletions

View File

@@ -1111,7 +1111,7 @@ func (d *dbBase) ReadBatch(ctx context.Context, q dbQuerier, qs *querySet, mi *m
ind.Set(mind)
} else {
if cnt == 0 {
// you can use a empty & caped container list
// you can use an empty & caped container list
// orm will not replace it
if ind.Len() != 0 {
// if container is not empty
@@ -1135,7 +1135,7 @@ func (d *dbBase) ReadBatch(ctx context.Context, q dbQuerier, qs *querySet, mi *m
ind.Set(slice)
} else {
// when a result is empty and container is nil
// to set a empty container
// to set an empty container
if ind.IsNil() {
ind.Set(reflect.MakeSlice(ind.Type(), 0, 0))
}

View File

@@ -155,7 +155,7 @@ func (d *dbBaseMysql) InsertOrUpdate(ctx context.Context, q dbQuerier, mi *model
if isMulti {
qmarks = strings.Repeat(qmarks+"), (", multi-1) + qmarks
}
// conflitValue maybe is a int,can`t use fmt.Sprintf
// conflitValue maybe is an int,can`t use fmt.Sprintf
query := fmt.Sprintf("INSERT INTO %s%s%s (%s%s%s) VALUES (%s) %s "+qupdates, Q, mi.table, Q, Q, columns, Q, qmarks, iouStr)
d.ins.ReplaceMarks(&query)

View File

@@ -90,7 +90,7 @@ func (c *Condition) AndCond(cond *Condition) *Condition {
return c
}
// AndNotCond combine a AND NOT condition to current condition
// AndNotCond combine an AND NOT condition to current condition
func (c *Condition) AndNotCond(cond *Condition) *Condition {
c = c.clone()
if c == cond {
@@ -121,7 +121,7 @@ func (c Condition) OrNot(expr string, args ...interface{}) *Condition {
return &c
}
// OrCond combine a OR condition to current condition
// OrCond combine an OR condition to current condition
func (c *Condition) OrCond(cond *Condition) *Condition {
c = c.clone()
if c == cond {
@@ -133,7 +133,7 @@ func (c *Condition) OrCond(cond *Condition) *Condition {
return c
}
// OrNotCond combine a OR NOT condition to current condition
// OrNotCond combine an OR NOT condition to current condition
func (c *Condition) OrNotCond(cond *Condition) *Condition {
c = c.clone()
if c == cond {

View File

@@ -257,7 +257,7 @@ func (o *querySet) DeleteWithCtx(ctx context.Context) (int64, error) {
return o.orm.alias.DbBaser.DeleteBatch(ctx, o.orm.db, o, o.mi, o.cond, o.orm.alias.TZ)
}
// return a insert queryer.
// return an insert queryer.
// it can be used in times.
// example:
// i,err := sq.PrepareInsert()

View File

@@ -405,7 +405,7 @@ type QuerySeter interface {
// //delete two user who's name is testing1 or testing2
Delete() (int64, error)
DeleteWithCtx(context.Context) (int64, error)
// return a insert queryer.
// return an insert queryer.
// it can be used in times.
// example:
// i,err := sq.PrepareInsert()