Commit Graph
113 Commits
Author SHA1 Message Date
Cédric Krier 0f3587cf59 Set a max limit to sqlite backend
SQLite does not support offset without a limit. So we must use a negative value
to have no upper bound.

issue11126
review395291002
2022-01-20 19:03:19 +01:00
Cédric Krier a0bfbfa255 Follow isort formatting
issue10928
2021-12-11 17:58:45 +01:00
Cédric Krier 834007b353 Support window functions with SQLite backend
issue7703
review364231002
2021-11-08 19:30:15 +01:00
Cédric Krier a1a2e6eb70 Use JSONB to store Dict field on PostgreSQL backend
issue10858
review379371002
2021-11-08 19:27:03 +01:00
Nicolas Évrard c9d43f50c0 Add support for SQL expression to sqlite's TRIM
issue10510
review352121003
2021-06-16 14:55:46 +02:00
Cédric Krier d8ddff1b9b Add BOOL_AND and BOOL_OR to SQLite backend
issue10316
review330801002
2021-05-16 18:09:28 +02:00
Cédric Krier 4acc4c8467 Do not warn about single '/' as path in database uri
This is a valid configuration according to the documentation.

issue10101
2021-04-13 01:45:30 +02:00
Cédric Krier c76743ee0c Keep raising exception when DB path of SQLite does not exist
issue10101
2021-04-12 22:08:36 +02:00
Nicolas Évrard a5e3d0b0f8 Add support for database connection parameters to configuration URI
issue10101
review339891002
2021-04-12 20:39:23 +02:00
Cédric Krier 45d406e270 Add full text and similarity search
issue10023
review320601007
2021-03-21 16:21:05 +01:00
Cédric Krier 9c81cb6a4a Replace cursor fetchall by iteration over cursor
issue5817
review335831003
2021-03-21 16:09:13 +01:00
David Harper 6fec6444fc Add trigonometric functions to sqlite backend
issue9996
review333731002
2021-02-06 10:47:06 +00:00
Cédric Krier 4fec4c82c6 Add more logging on database connection and testing
issue9120
review269021002
2020-04-11 00:24:37 +02:00
Cédric Krier 748fe7212e Add database default name configuration
Some user may need to customize the default name used to run operation without
proper database name.

issue9121
review273021002
2020-04-01 23:56:17 +02:00
Cédric Krier d7ed5f91f5 Fix flake8 errors and warnings
We add the flake8 configuration used so we ensure everyone uses the same.
We remove the usage of __all__ for non public API.
When possible, we rationalize the class name according to its __name__ and module.

issue9082
review297061002
2020-03-01 12:33:54 +01:00
Cédric Krier 3d20f1b64e Display the path of the database in error message
Instead of just the filename.

issue8995
review288881002
2020-01-29 00:05:32 +01:00
Cédric Krier 606bdb7ce9 Ensure all SQL functions are supported by the backend's
issue8942
review270751002
2020-01-13 23:47:17 +01:00
Cédric Krier def268915a Add MultiSelection field
issue7851
review249911002
2019-09-20 11:32:56 +02:00
Cédric Krier f56c5be5ad Add minimal to_char for date and datetime on SQLite
We support only date and datetime with common pattern between SQL and Python.

issue8464
review261761002
2019-08-07 19:34:33 +02:00
Cédric Krier 190657e0ef Make CurrentTimestamp transactional for SQLite backend
It must return the same timestamp during the all transaction.

issue8457
review271641002
2019-07-08 21:27:55 +02:00
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