Commit Graph
93 Commits
Author SHA1 Message Date
Cédric Krier 62f175d3d1 Set flavor in SQLite database init and test
Those methods use python-sql to make queries but they can be called with a
simple connection and not under a Transaction.
2019-01-28 10:03:47 +01:00
Cédric Krier 889b1cc9f8 Allow to search and order on Dict key value
issue7905
review62391002
2019-01-18 11:32:47 +01:00
Cédric Krier ae06a8bca2 Add transactional queue and workers
issue7406
review45461002
2018-07-27 09:32:28 +02:00
Cédric Krier d2a461390a Remove support for Python 2.7
issue7497
review53261002
2018-06-26 19:11:19 +02:00
Cédric Krier 0aed819d47 Add hostname configuration to list database
issue7375
review44991002
2018-05-22 23:42:35 +02:00
Cédric Krier df4e5f0cb0 Replace day and month by 1 in date_trunk for SQLite
The value 0 is not valid for day and month.

issue7263
review45311002
2018-03-27 22:14:01 +02:00
Cédric Krier b3ca13748b Add Exclude constraint
issue1422
review44061002
2018-03-19 16:57:49 +01:00
Cédric Krier 8a7953bb8f Use proper SQL types
- When recreating the table to drop a column, the correct SQL type must be
  converted by the database.
- SQLite uses BOOLEAN as base type for BOOL

issue7120
review37001002
2018-02-19 19:07:30 +01:00
Cédric Krier f1c4e19155 Improve support of date_trunc for SQLite backend
issue7030
review40891002
2018-01-08 19:24:39 +01:00
Nicolas Évrard 5cee718423 Move low level handling of the SQL type to the backend
This changeset defines on the field the (somehow) abstract SQL type a field
should use letting the duty of specifying the real SQL type the database
supports and the conversion to/from the python types to the backend.

issue6351
review33951002
2017-03-31 12:44:22 +02:00
Nicolas Évrard c3f69d1db7 Add NULLS ordering
issue5858
review27651002
2017-03-29 23:12:01 +02:00
Sergi Almacellas Abellana a78cffdad4 Support position argument of Trim function in sqlite
The position argument is not suported on sqlite but the LTRIM and RTRIM
function are used instead.

issue6378
review31221002
2017-03-22 11:59:29 +01:00
Cédric Krier 7004574de7 Add logging on cursor execute
issue6211
review34651002
2017-02-02 12:06:55 +01:00
Nicolas Évrard d5e24102f3 Fix missing renaming of install to activate
issue1456
review28941002
2016-10-21 12:44:57 +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
Sergi Almacellas Abellana 5967d21d46 Remove database management from RPC
issue5384
review29311002
2016-07-07 16:05:45 +02: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
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
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 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 a09d9a54a1 Simplify module information with python configuration
review363001
2012-06-08 19:32:23 +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
Cédric Krier e348c49312 Add support of fields.Time
issue2313
review231006
2012-02-07 16:11:22 +01:00
Cédric Krier 7d457f46c4 Store session in database
review210012
2012-01-11 20:30:27 +01:00