Closed CodeTrol closed 9 years ago
Thanks @CodeTrol, but LIMIT and OFFSET are intentionally excluded from the core SQL-Bricks library, since the syntax and keywords for these differ widely across SQL engines/dialects and the core library is focused solely on comprehensive support for the cross-dialect core of SQL-92.
LIMIT and OFFSET are included in the sqlite and postgres extensions to SQL-Bricks. If you're interested in MySQL or in a different engine/dialect, feel free to create your own extension, it shouldn't be too hard, especially if you follow the example of the postgres extension, since it uses the latest extension mechanism (I still need to update the sqlite extension to match it).
@CodeTrol: If you do create a dialect-specific SQL-Bricks extension, please let me know so I can link to it for others.
Thanks for pointing this out. I thought library is focused only to MySQL dialect.
Example usage:
``` select().from('test_table').limit(0,5).toString()
'SELECT * FROM test_table LIMIT 0,5'