mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
Sql: SqlExp: .Limit(n) in MSSQL emulated using TOP
git-svn-id: svn://ultimatepp.org/upp/trunk@7805 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
222a370074
commit
1b23228d8b
1 changed files with 4 additions and 1 deletions
|
|
@ -115,7 +115,10 @@ SqlSelect& SqlSelect::NoWait() {
|
|||
}
|
||||
|
||||
SqlSelect& SqlSelect::Limit(int limit) {
|
||||
text << " limit " << limit;
|
||||
ASSERT(text.StartsWith("select "));
|
||||
String s = AsString(limit);
|
||||
text.Insert(6, SqlCase(MSSQL, " top " + s)());
|
||||
text << SqlCase(MSSQL, "")(" limit " + s);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue