Skip to content

Commit

Permalink
Support LIMIT command in SQLite via SQLSelect.Top. Closes #93.
Browse files Browse the repository at this point in the history
  • Loading branch information
hisystems committed Jun 29, 2014
1 parent b9e1a1e commit 03251d5
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions SQL/Serializers/SQLiteSerializer.cs
Expand Up @@ -61,6 +61,18 @@ public override string SerializeDropIndex(SQLDropIndex dropIndex)
return "DROP INDEX " + SerializeIdentifier(dropIndex.Name);
}

public override string SerializeSelect(SQLSelect select)
{
var tokens = new TokenSerializer();

tokens.Add(base.SerializeSelect(select));

if (select.Top > 0)
tokens.Add("LIMIT " + select.Top.ToString());

return tokens.ToString();
}

public override string SerializeTableField(SQLTableField field, SQLTableFields.AlterModeType alterMode)
{
// if altering or creating a field append the AUTOINCREMENT. Field format: name datatype default nullable keytype AUTOINCREMENT
Expand Down

0 comments on commit 03251d5

Please sign in to comment.