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
cd04197025
Use DROP COLUMN from SQLite 3.35.0
...
issue7703
2021-11-08 22:52:40 +01:00
Cédric Krier
c6ca01b701
Support to alter more numeric types
...
issue10897
review381261002
2021-11-08 19:33:56 +01:00
Cédric Krier
d8c3e5ccca
Use RENAME and DROP COLUMN with SQLite backend
...
issue7703
review367691002
2021-11-08 19:31:34 +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
2afbbac4c3
Use qmark instead of format as paramstyle for SQLite
...
issue10283
2021-04-14 10:11:42 +02:00
Sergi Almacellas Abellana
baa364f808
Only test column varchar size when set
...
issue10276
review338071003
2021-04-13 14:22:48 +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
Nicolas Évrard
2f08e73ba2
Escape identifiers in backend
...
issue10245
review317021002
2021-04-12 23:07:55 +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
ffe62f46e8
Allow column sql types to be tested from the table handler
...
issue9645
review312421002
2021-04-12 20:56:08 +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
Cédric Krier
04a0aea2ad
Add __access__ to Model
...
issue9903
review324601002
2021-03-07 11:13:53 +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
246c672073
Remove unique constraint on ir.translation
...
issue8034
review46721002
2019-02-13 10:27:32 +01: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
342bc9f13d
Correctly rename column with SQLite
...
The table must be recreated if the target column does not exist.
Also temporary column name should use double underscore as module may use
single underscore.
issue7978
review52591002
2019-01-15 11:30:20 +01:00
Cédric Krier
ae06a8bca2
Add transactional queue and workers
...
issue7406
review45461002
2018-07-27 09:32:28 +02:00
Cédric Krier
3547690d8b
Allow SQL expression and where clause in index_action
...
issue7580
review46621002
2018-07-24 19:29:16 +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
036ca6d6a9
Always raise exception in table handler
...
issue7175
review40161002
2018-03-15 00:43:32 +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
Cédric Krier
473ac78eb4
Add exceptional parent language
...
issue6956
review40821003
2017-11-25 22:00:24 +01:00
Nicolas Évrard
ddb7769310
Move handling of sequences to the Database object
...
issue6788
review43521002
2017-10-02 17:48:23 +02:00
Sergi Almacellas Abellana
730ecb68b2
Implement alter_type and alter_size for sqlite backend
...
issue6730
review38591002
2017-09-20 11:29:12 +02:00
Cédric Krier
4520afedd3
Convert into hash too long data name
...
Some back-ends have constraint on the length of data name, they usually
silently truncate them, but this can create collision. The solution is to hash
the name when it is too long.
issue4620
issue6494
review37381003
2017-05-12 12:00:44 +02:00
Cédric Krier
826f30219d
Re-use method as default parameter of TableHandler add_column
...
There is no guarantee that the method will not raise a database error on the
first registration because it can rely on other tables being registered.
So the method must be called only when needed. This is when the table already
exists and has records. In this case other tables also already exist.
issue6409
2017-04-01 16:14:36 +02:00
Nicolas Évrard
aa9c9cc9e7
Use sql type instead of field related argument in the column creation
...
issue6348
review26231002
2017-03-31 13:21:51 +02: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