Use Field.sql_column for SELECT queries in ModelSQL
By using sql_column, it increases the possibilities of customisation of fields. issue4369 review14711002
This commit is contained in:
1 parent
59afe32b76
commit
67d5291bfd
3 files changed
+18
-8
No files matched your search
@@ -179,7 +179,8 @@ class Database(DatabaseInterface):
|
||||
raise IOError('Database "%s" doesn\'t exist!' % db_filename)
|
||||
if self._conn is not None:
|
||||
return self
|
||||
self._conn = sqlite.connect(path, detect_types=sqlite.PARSE_DECLTYPES)
|
||||
self._conn = sqlite.connect(path,
|
||||
detect_types=sqlite.PARSE_DECLTYPES | sqlite.PARSE_COLNAMES)
|
||||
self._conn.create_function('extract', 2, SQLiteExtract.extract)
|
||||
self._conn.create_function('date_trunc', 2, date_trunc)
|
||||
self._conn.create_function('split_part', 3, split_part)
|
||||
|
||||
Reference in new issue
Block a user