@@ -19,7 +19,7 @@ const (
1919)
2020
2121func TestBuilder (t * testing.T ) {
22- ctx := pagehelper .C (context .Background ()).Page (1 , 3 ).Order ("test" , pagehelper .ASC ).Build ()
22+ ctx := pagehelper .C (context .Background ()).Page (1 , 3 ).OrderBy ("test" , pagehelper .ASC ).Build ()
2323 ctx , _ = context .WithTimeout (ctx , time .Second )
2424 p := ctx .Value (pageHelperValue )
2525 o := ctx .Value (orderHelperValue )
@@ -29,7 +29,7 @@ func TestBuilder(t *testing.T) {
2929}
3030
3131func TestBuilder2 (t * testing.T ) {
32- ctx := pagehelper .C (context .Background ()).PageWithCount (1 , 3 , "" ).Order ("test" , pagehelper .ASC ).Build ()
32+ ctx := pagehelper .C (context .Background ()).PageWithCount (1 , 3 , "" ).OrderBy ("test" , pagehelper .ASC ).Build ()
3333 ctx = pagehelper .C (ctx ).DESC ("new_field" ).Build ()
3434 ctx , _ = context .WithTimeout (ctx , time .Second )
3535 p := ctx .Value (pageHelperValue )
@@ -40,7 +40,7 @@ func TestBuilder2(t *testing.T) {
4040}
4141
4242func TestBuilder3 (t * testing.T ) {
43- ctx := pagehelper .C (context .Background ()).Page (1 , 3 ).Order ("test" , pagehelper .ASC ).Build ()
43+ ctx := pagehelper .C (context .Background ()).Page (1 , 3 ).OrderBy ("test" , pagehelper .ASC ).Build ()
4444 ctx = pagehelper .C (ctx ).DESC ("new_field" ).ASC ("new_field2" ).Count ("test" ).Page (2 ,100 ).Build ()
4545 ctx , _ = context .WithTimeout (ctx , time .Second )
4646 p := ctx .Value (pageHelperValue )
0 commit comments