fix
parent
d8653ccf8f
commit
6a5a48f8ed
|
@ -10,6 +10,9 @@ import (
|
|||
|
||||
func (s *SqlBuilder[T]) buildSql() string {
|
||||
s.DeletePlaceholderSymbol()
|
||||
if s.Driver == util.DriverOracle {
|
||||
s.Sql = fmt.Sprintf("select t.*,rownum rn from (%s) t", s.Sql)
|
||||
}
|
||||
return s.Sql
|
||||
}
|
||||
|
||||
|
|
|
@ -65,7 +65,8 @@ func TestOracle(t *testing.T) {
|
|||
sqlb.InsertConditions("@c1", "area_dn like ?", "level1=1,level2=85226,level3=86918,level4=86919,level5=86986%")
|
||||
sqlb.InsertConditions("@c2", "autoseq in (?)", ids)
|
||||
page := Page{PageIndex: 1, PageSize: 10}
|
||||
err = sqlb.PaginateBySql(&data, &page)
|
||||
err = sqlb.FindBySql(&data)
|
||||
fmt.Println(data)
|
||||
page.Data = &data
|
||||
fmt.Println(err, page)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue