@ -42,12 +42,12 @@ namespace OrmTest.UnitTest
base . Check ( @"SELECT `ID`,`SchoolId`,`Name`,`CreateTime` FROM `STudent` ORDER BY `ID` ASC LIMIT 1,3" , null , t4 . Key , null , "single t4 Error" ) ;
base . Check ( @"SELECT `ID`,`SchoolId`,`Name`,`CreateTime` FROM `STudent` ORDER BY `ID` ASC LIMIT 1,3" , null , t4 . Key , null , "single t4 Error" ) ;
var t5 = db . Queryable < Student > ( ) . OrderBy ( it = > it . Id ) . Skip ( 3 ) . ToSql ( ) ;
var t5 = db . Queryable < Student > ( ) . OrderBy ( it = > it . Id ) . Skip ( 3 ) . ToSql ( ) ;
base . Check ( @"SELECT `ID`,`SchoolId`,`Name`,`CreateTime` FROM `STudent` LIMIT 4 ,9223372036854775807" , null , t5 . Key , null , "single t5 Error" ) ;
base . Check ( @"SELECT `ID`,`SchoolId`,`Name`,`CreateTime` FROM `STudent` LIMIT 3 ,9223372036854775807" , null , t5 . Key , null , "single t5 Error" ) ;
int pageIndex = 2 ;
int pageIndex = 2 ;
int pageSize = 1 0 ;
int pageSize = 1 0 ;
var t6 = db . Queryable < Student > ( ) . OrderBy ( it = > it . Id , OrderByType . Desc ) . Skip ( ( pageIndex - 1 ) * pageSize ) . Take ( pageSize ) . ToSql ( ) ;
var t6 = db . Queryable < Student > ( ) . OrderBy ( it = > it . Id , OrderByType . Desc ) . Skip ( ( pageIndex - 1 ) * pageSize ) . Take ( pageSize ) . ToSql ( ) ;
base . Check ( @"SELECT `ID`,`SchoolId`,`Name`,`CreateTime` FROM `STudent` ORDER BY `ID` DESC LIMIT 11 ,10" , null , t6 . Key , null , "single t6 Error" ) ;
base . Check ( @"SELECT `ID`,`SchoolId`,`Name`,`CreateTime` FROM `STudent` ORDER BY `ID` DESC LIMIT 10 ,10" , null , t6 . Key , null , "single t6 Error" ) ;
int studentCount = db . Ado . GetInt ( "select count(1) from Student" ) ;
int studentCount = db . Ado . GetInt ( "select count(1) from Student" ) ;
@ -95,7 +95,7 @@ namespace OrmTest.UnitTest
. Where ( it = > it . Id = = 1 )
. Where ( it = > it . Id = = 1 )
. WhereIF ( true , it = > SqlFunc . Contains ( it . Name , "a" ) )
. WhereIF ( true , it = > SqlFunc . Contains ( it . Name , "a" ) )
. OrderBy ( it = > it . Id , OrderByType . Desc ) . Skip ( ( pageIndex - 1 ) * pageSize ) . Take ( pageSize ) . With ( SqlWith . NoLock ) . ToSql ( ) ;
. OrderBy ( it = > it . Id , OrderByType . Desc ) . Skip ( ( pageIndex - 1 ) * pageSize ) . Take ( pageSize ) . With ( SqlWith . NoLock ) . ToSql ( ) ;
base . Check ( @"SELECT `ID`,`SchoolId`,`Name`,`CreateTime` FROM `STudent` WHERE ( `ID` = @Id0 ) AND (`Name` like concat('%',@MethodConst1,'%')) ORDER BY `ID` DESC LIMIT 11 ,10" , new List < SugarParameter > ( ) {
base . Check ( @"SELECT `ID`,`SchoolId`,`Name`,`CreateTime` FROM `STudent` WHERE ( `ID` = @Id0 ) AND (`Name` like concat('%',@MethodConst1,'%')) ORDER BY `ID` DESC LIMIT 10 ,10" , new List < SugarParameter > ( ) {
new SugarParameter ( "@Id0" , 1 ) , new SugarParameter ( "@MethodConst1" , "a" )
new SugarParameter ( "@Id0" , 1 ) , new SugarParameter ( "@MethodConst1" , "a" )
} , t8 . Key , t8 . Value , "single t8 Error" ) ;
} , t8 . Key , t8 . Value , "single t8 Error" ) ;