Nicolas Évrard
7e3007ede1
Use the same heuristic to compute full text search config for both operation
...
issue11130
review395301002
2022-02-08 18:44:55 +01:00
Cédric Krier
a0bfbfa255
Follow isort formatting
...
issue10928
2021-12-11 17:58:45 +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
Cédric Krier
97c0707106
Do not use keyword argument for sequence_next_number SQL
...
issue10621
review342831002
2021-08-12 18:35:15 +02:00
Sergi Almacellas Abellana
a779eefbfd
Add missing rename word in postgresql sequence rename
...
issue10275
review338071002
2021-04-13 12:06:56 +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
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
99135bf9db
Close connection after testing the database
...
issue9629
review302191002
2020-09-24 23:02:14 +02:00
Cédric Krier
261c7b0a52
Do not set transaction as readonly with psycopg2cffi
...
issue9546
review294341002
2020-08-29 18:23:26 +02:00
Cédric Krier
f376687b5a
Use readonly connection attribute
...
It is not allowed to Call SET TRANSACTION in an AUTOCOMMIT transaction.
It is better to set 'readonly' attribute when available and not set the
transaction in readonly when autocommit is set.
issue9477
review294171002
2020-07-21 14:29:14 +02: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
973e428caa
Replace advisory lock by SKIP LOCKED in queue pulling
...
It is simpler and closer to standard SQL.
issue8910
review288701002
2019-12-28 18:05:25 +01:00
Nicolas Évrard
8fb13634ea
Use direct access to backend classes
...
issue8836
review258421002
2019-12-06 17:33:47 +01:00
Cédric Krier
def268915a
Add MultiSelection field
...
issue7851
review249911002
2019-09-20 11:32:56 +02:00
Cédric Krier
c4dde4d466
Store database pool per process
...
The connection pool can not be shared between multiple processes.
issue8281
review285251002
2019-06-27 21:45:37 +02:00
Cédric Krier
e1cb85ddad
Replace dsn by params to connect to postgresql
...
It is safer to use explicit params than construct DSN string.
issue8270
review269321002
2019-04-15 15:56:03 +02:00
Cédric Krier
0d15afb90e
Add coroutine concurrency option
...
issue8010
review53501002
2019-02-05 19:09:53 +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
Nicolas Évrard
eb04b82822
Add bus management
...
issue7537
review66341002
2018-08-30 11:15:01 +02:00
Cédric Krier
c37f12834e
Use a copied list to iterate on databases
...
The close method pop the database from the list during the iteration which
will change the size of the dict.
issue7639
review70331002
2018-08-27 10:43:08 +02:00
Cédric Krier
ae06a8bca2
Add transactional queue and workers
...
issue7406
review45461002
2018-07-27 09:32:28 +02:00
Cédric Krier
283b3970f8
Do not keep unused database for 30 minutes
...
This prevents to keep the minimal connection on database that are not used
anymore. And set minimal connection to 0 for template1
issue7531
review62261002
2018-07-10 17:56:44 +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
1fc70d083d
Use server_version from psycopg2 connection object
...
instead of executing a statement and manage our own cache.
issue7465
review51311002
2018-06-04 19:05:25 +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
b3ca13748b
Add Exclude constraint
...
issue1422
review44061002
2018-03-19 16:57:49 +01:00
Nicolas Évrard
acdbe5a08f
Allow to perform unaccented searches on Char fields
...
issue7115
review44611002
2018-03-16 18:17:53 +01:00
Cédric Krier
e778370e02
Ensure to put back the connection with a try/finally
...
This prevents to leak connection in the ThreadedConnectionPool of psycopg2.
issue7137
review39181002
2018-02-19 19:11:33 +01:00
Cédric Krier
291beaa10c
Wait for the database accepting connection to run tests
...
issue6844
review43671002
2017-10-30 09:36:10 +01:00
Nicolas Évrard
06c4fe4868
Add support for PosgreSQL version >= 10 sequences
...
issue6789
review43531002
2017-10-02 17:59:16 +02:00
Nicolas Évrard
ddb7769310
Move handling of sequences to the Database object
...
issue6788
review43521002
2017-10-02 17:48:23 +02:00
Cédric Krier
07d293caf8
Add support test database cache for remote postgresql
...
If pg_dump/pg_restore are not available, we create a copy of the database on
PostgreSQL server using the template option of "CREATE DATABASE". We still
create a file in the cache folder to know that there is a backup.
issue6699
2017-08-15 00:21:45 +02:00
Sergi Almacellas Abellana
b637c503e7
Only convert dict fields when they are strings
...
issue6382
review28101002
2017-06-09 13:22:42 +02:00
Nicolas Évrard
12824d6457
Reset the database list cache on the right class
...
issue6429
review35371003
2017-04-17 00:17:09 +02:00
Sergi Almacellas Abellana
5b86281166
Add missing types mapping for Postgresql backend
...
issue6411
review34071002
2017-04-03 13:11:07 +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
Sergi Almacellas Abellana
6575419cc9
Add window functions on Database
...
issue6355
review33961002
2017-03-22 10:49:26 +01:00
Nicolas Évrard
f207968ba8
Remove assert on scheme from postgresql and mysql backends
...
issue6349
review27191002
2017-03-14 11:13:21 +01:00
Cédric Krier
601b8218e3
Do not log, as error, exception in cursor execute
...
There are expected exceptions that should not be logged and the others should
be logged by the caller.
issue6211
review26101002
2017-02-08 10:22:40 +01:00
Cédric Krier
7004574de7
Add logging on cursor execute
...
issue6211
review34651002
2017-02-02 12:06:55 +01:00
Cédric Krier
1b3dbec3b4
Ensure only one connection pool is created per database
...
It is too complex and expensive to lazy create the connection pool because all
methods which uses the pool needs to acquire a lock. So it is easier to create
it when the instance is also created. In this case, on closing the database, it
should be unregistered from the instances dictionary.
issue6202
review32991002
2017-01-29 01:15:45 +01:00
Cédric Krier
c1b8ee10c6
Add has_select_for on Database
...
- Use has_select_for for ir.sequence.strict instead of lock
issue6134
review32911002
2017-01-25 23:21:57 +01:00
Nicolas Évrard
d5e24102f3
Fix missing renaming of install to activate
...
issue1456
review28941002
2016-10-21 12:44:57 +02:00
Cédric Krier
c0efe773f0
Fix has_attribute for AttributeError on _database
...
The code added from changeset 9b2e0aac2d9c does not work anymore because the
method has moved on the Database object and it requires a connection as
parameter.
So we add cache on the returned value to prevent to consume unnecessary
connection.
issue5818
2016-08-25 16:46:44 +02:00
Cédric Krier
8b9232ab81
Re-add has_returning for PostgreSQL
...
issue5818
review25621002
2016-08-25 15:38:07 +02:00