You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$this->assertEquals('SELECT TOP 3 * FROM [dbo].[posts] [t]', $command->text);
50
+
51
+
$command = $this->createFindCommand(array(
52
+
'select'=>'id, title',
53
+
'order'=>'title',
54
+
'limit'=>2,
55
+
'offset'=>3
56
+
));
57
+
$this->assertEquals('SELECT * FROM (SELECT TOP 2 * FROM (SELECT TOP 5 id, title FROM [dbo].[posts] [t] ORDER BY title) as [__inner__] ORDER BY title DESC) as [__outer__] ORDER BY title ASC', $command->text);
58
+
59
+
$command = $this->createFindCommand(array(
60
+
'limit'=>2,
61
+
'offset'=>3
62
+
));
63
+
$this->assertEquals('SELECT * FROM (SELECT TOP 2 * FROM (SELECT TOP 5 * FROM [dbo].[posts] [t] ORDER BY id) as [__inner__] ORDER BY id DESC) as [__outer__] ORDER BY id ASC', $command->text);
64
+
65
+
$command = $this->createFindCommand(array(
66
+
'select'=>'title',
67
+
));
68
+
$this->assertEquals('SELECT title FROM [dbo].[posts] [t]', $command->text);
Copy file name to clipboardExpand all lines: tests/framework/db/schema/CMssqlTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -224,7 +224,7 @@ public function testCommandBuilder()
224
224
'order'=>'title',
225
225
'limit'=>2,
226
226
'offset'=>3)));
227
-
$this->assertEquals('SELECT * FROM (SELECT TOP 2 * FROM (SELECT TOP 5 id, title FROM [dbo].[posts] [t] ORDER BY title) as [__inner__] ORDER BY title DESC) as [__outer__] ORDER BY title ASC',$c->text);
0 commit comments