Commit Graph
117 Commits
Author SHA1 Message Date
Maxime Richez 6144237ef6 Re-fix TypeError on drop_column for SQLite
Fixing bad interpretation on the value (tuple) when iterating on the dictionary
in previous changeset 9c2eb1b04df8

issue2647
review33491002
2016-10-24 16:15:28 +02:00
Nicolas Évrard d5e24102f3 Fix missing renaming of install to activate
issue1456
review28941002
2016-10-21 12:44:57 +02:00
Maxime Richez e954c2fe38 Fix TypeError on drop_column for SQLite
It uses now tuple unpacking on the loop.
It was introduced in changeset a3ef75ef8f6a

issue2647
review32641002
2016-10-13 10:05:44 +02:00
Sergi Almacellas Abellana e2afba1e9a Ensure sqlite connection is set when initializing the database
issue5906
review26721002
2016-09-24 19:54:13 +02:00
Maxime Richez 99688e1901 Add missing implementation of drop_column for SQLite
issue2647
review30311002
2016-08-23 17:19:23 +02:00
Sergi Almacellas Abellana 5967d21d46 Remove database management from RPC
issue5384
review29311002
2016-07-07 16:05:45 +02:00
Cédric Krier ddba34889c Prevent comparison when column size if None in TableHandler
column size could be None so in Python 3, it can not be compare to integer.

issue5661
review28361002
2016-06-30 18:35:42 +02:00
Cédric Krier 9e57ec6627 Improve TableHandler's to update only modified property
It adds keywords argument to _update_definition to limit the update as most of
the time only one kind of property is modified.

issue5416
review22891002
2016-03-25 11:25:43 +01:00
Cédric Krier 4a4a62dbe1 Add missing Database.connect in list with sqlite
The test method requires the database instance to be connected.

issue5407
review24941002
2016-03-16 13:06:37 +01:00
Nicolas Évrard 2fef479575 Follow PEP-0249 for Transaction and backends
issue4949
review19781002
2016-03-03 21:51:57 +01:00
Cédric Krier 3e13f3d004 Fix SQLite greatest and least for unorderable None
In Python3, None can not be ordered because it doesn't have a natural order.
So we implement the same behaviour for SQLite than PostgreSQL which ignore NULL.

issue5358
review20821002
2016-03-01 21:46:14 +01:00
Cédric Krier 68eca37c72 Add _update_definitions after column_rename
issue5325
review16001002
2016-02-15 10:07:18 +01:00
Cédric Krier 41f4702273 Use warnings instead of logging for missing SQLite TableHandler features
and capture warnings into logging.
This allow to not be flooded by the same kind of warnings when running tests.

issue5316
review17821002
2016-02-09 18:42:59 +01:00
Sharoon Thomas 89de660c52 Move webdav into a separate module
issue4703
review7101002
2016-01-16 19:20:30 +01:00
Cédric Krier 6cd05ed6fe Add has_multirow_insert
There are still many databases that doesn't support this SQL-92 syntax.

issue4881
review19331002
2015-07-28 08:04:29 +02:00
Cédric Krier 7459aab3d1 Use CURRENT_TIMESTAMP instead of NOW
CURRENT_TIMESTAMP is the correct SQL standard way.

issue4837
review15531002
2015-07-01 19:41:49 +02:00
Cédric Krier eddb17dea7 Re-factor dict* methods on each cursor into the interface
issue4807
review7241002
2015-06-15 01:18:07 +02:00
Cédric Krier 52ff97b165 Rename ir.module.module* into ir.module*
issue4764
review7171002
2015-05-28 21:02:01 +02:00
Cédric Krier b9e9964157 Fix Greatest and Least for SQLite
issue4597
review12051002
2015-03-24 22:04:12 +01:00
Cédric Krier 4be42a5b50 Fix encoding/decoding in adapter/converter of sqlite for Python3
bytes must be used when storing raw values of adapter in blob
bytes is received by the converter and so it must be decoded into unicode

issue3211
2015-03-19 21:44:54 +01:00
Cédric Krier 31e8634bf4 Fix bytes and bytearray usage
- sqlite can not convert bytearray, must use buffer
- binary value could be stored as unicode
- don't dump bytes as base64 in xmlrpclib if bytes is str
2015-03-16 20:13:03 +01:00
Cédric Krier 5cfde31ed2 Use bytes and bytearray for Binary
issue4637
review11091002
2015-03-16 19:28:34 +01:00
Cédric Krier 20484bb013 Fix formatting in logger calls 2015-03-05 11:32:18 +01:00
Sergi Almacellas Abellana 5436fe6cee Add support for Greatest and Least on SQLite
issue4597
review13011002
2015-03-04 18:15:06 +01:00
Cédric Krier 0ac0990c77 Improve logging
issue4458
review11781002
2015-03-02 23:39:15 +01:00
Cédric Krier 5a34e18b75 Fix SQLite convert interval for min/max value
The total_seconds of timedelta min and max can not be used to instanciate a
timedelta. So we need to test for such case and return timedelta min or max.
2015-02-09 23:36:32 +01:00
Cédric Krier 0991a552de Add TimeDelta field
And remove float_time widget.

issue4026
review5911002
2015-02-09 22:58:56 +01:00
Cédric Krier 288dc51876 SQL SIGN must return zero for zero
The SQLite implementation of SIGN is not correct for zero, it must return zero
instead of 1.

issue4518
review10831002
2015-02-04 23:19:45 +01:00
Cédric Krier 67d5291bfd Use Field.sql_column for SELECT queries in ModelSQL
By using sql_column, it increases the possibilities of customisation of fields.

issue4369
review14711002
2014-12-20 19:24:42 +01:00
Cédric Krier c144f8c349 Fix most flake8 errors
review8771002
2014-12-02 12:54:01 +01:00
Cédric Krier e0b995abbe Refactore configuration to allow easy extention
issue3627
review7401002
2014-09-03 23:32:01 +02:00
Cédric Krier 49ce719d0e Add SQLite support for char_length
review10331002
2014-05-27 22:32:26 +02:00
Cédric Krier 6b3f7fb250 Add sign function to SQLite backend
review3411002
2014-02-14 00:00:09 +01:00
Cédric Krier c46a026c40 Refactore Transaction to add close and autocommit
review2151002
2013-12-18 18:09:43 +01:00
Cédric Krier 5afcfb3b49 Activate foreign_keys in SQLite if available
review1064002
2013-09-18 13:40:51 +02:00
Cédric Krier fc6c6cfdda Migration to python-sql
* Use python-sql
* Add convert_domain method on Fields
* Add sql_format and sql_type methods on Fields
* Allow to return a full domain for Function.searcher
* Replace static backend by dynamic get method
* Replace order_field by order_<field name> method

review1001002
2013-09-06 22:32:37 +02:00
Cédric Krier 2e8ec5f5df Replace SPLIT_PART by SUBSTR and POSITION
SPLIT_PART is not a standard SQL function (it is not supported by MySQL).
SUBSTR is used even if it is not standard SQL because SUBSTRING is not
supported by SQLite. This will change once we will migrate to python-sql.

review784002
2013-04-14 23:17:55 +02:00
Cédric Krier 2ff45c8869 Let raise exception in sqlite extract 2013-03-13 18:43:35 +01:00
Cédric Krier d7a9e86ed1 Fix local variable 'microseconds' referenced before assignment
issue3049
2013-03-13 18:42:30 +01:00
Cédric Krier 5e01f5c068 Fix flake8 2013-02-27 22:50:31 +01:00
Pierre-Louis Bonicoli 8b1cae85f5 use IOError & display filename of db when SQLite db is not found
issue3020
review680002
2013-02-26 13:30:49 +01:00
Cédric Krier fd01a724f8 Add Dict fields
review501007
2013-01-26 15:18:41 +01:00
Cédric Krier 936dcca53a Store default language in database
review592004
2012-11-23 17:59:04 +01:00
Cédric Krier e5446dde37 Allow to use XML file for views
issue70
2012-09-26 19:38:20 +02:00
Cédric Krier 51ebd2fb3d Fix typo in SQL init of SQLite 2012-06-08 23:09:19 +02:00
Cédric Krier a09d9a54a1 Simplify module information with python configuration
review363001
2012-06-08 19:32:23 +02:00
Cédric Krier 3c49120885 Remove default value in init.sql
review356001
2012-05-07 13:58:26 +02:00
Cédric Krier ee3be37a36 Fix pep8 and pyflakes 2012-04-01 23:08:15 +02:00
Cédric Krier be0e5c54a9 Simplify workflow engine
- Remove workflow module
- Add ir.model.button for access rights

review256001
2012-03-25 00:15:17 +01:00
Nicolas Évrard 584d516067 Integer, Numeric and Float allow None as value
NULL value is None and not False

issue2022
review237004
2012-03-23 17:52:36 +01:00