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
Cédric Krier
9a1e636954
Initialize earlier the ir_cache table
...
As now the cache is managed by the Transaction, when creating the database for
the tests, the ir_cache table should be present before the registration of the
ir module. Also the transactions to create or drop the database should not have
cache because either the database is not created at the start or dropped at the
commit.
issue6216
review29171003
2017-02-02 13:14:19 +01:00
Cédric Krier
7004574de7
Add logging on cursor execute
...
issue6211
review34651002
2017-02-02 12:06:55 +01:00
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