From 093db03bc366cdc1b48f9dbc7cf8143b08f374e2 Mon Sep 17 00:00:00 2001 From: Giovanni Barillari Date: Fri, 22 Apr 2016 00:31:06 +0200 Subject: [PATCH] Close #316 --- pydal/dialects/sqlite.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pydal/dialects/sqlite.py b/pydal/dialects/sqlite.py index 0af561768..078d5c1a7 100644 --- a/pydal/dialects/sqlite.py +++ b/pydal/dialects/sqlite.py @@ -28,6 +28,15 @@ def regexp(self, first, second): return '(%s REGEXP %s)' % ( self.expand(first), self.expand(second, 'string')) + def select(self, fields, tables, where=None, groupby=None, having=None, + orderby=None, limitby=None, distinct=False, for_update=False): + if distinct and distinct is not True: + raise SyntaxError( + 'DISTINCT ON is not supported by SQLite') + return super(SQLiteDialect, self).select( + fields, tables, where, groupby, having, orderby, limitby, distinct, + for_update) + def truncate(self, table, mode=''): tablename = table._tablename return [