Commit Graph
213 Commits
Author SHA1 Message Date
Cédric Krier 7892f8ae56 Use declarative index definition for ModelSQL
issue5757
review361251002
2022-10-11 00:44:51 +02:00
Nicolas Évrard 88e8d42f27 Add configuration entries for unaccent and similarity functions
issue10851
review370001002
2022-10-09 19:58:51 +02:00
Nicolas Évrard 4dd1c0c222 Clear private caches when dropping database
issue11744
review413601003
2022-10-03 00:15:12 +02:00
Cédric Krier 12a3a8a9d7 Add backend documentation
issue9134
review269041003
2022-09-08 13:05:06 +02:00
Cédric Krier a5ac7ba55c Use singleton for TableHandler
issue11301
review366861002
2022-05-07 11:35:14 +02:00
Cédric Krier c0451724c7 Drop support for PyPy and psycopg2cffi
issue11330
review386371003
2022-04-10 19:10:14 +02:00
Cédric Krier cb29495dca Use psycopg2cffi only if there is no psycopg2
issue11329
review354791002
2022-04-06 18:40:49 +02:00
Cédric Krier 1c55eee094 Manage DatabaseDataError in ModelSQL
issue11314
review399111003
2022-04-04 00:35:38 +02:00
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 c6ca01b701 Support to alter more numeric types
issue10897
review381261002
2021-11-08 19:33:56 +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
Cédric Krier 23658d9e06 Update logging message for re-run update
issue10286
review357811002
2021-04-21 23:54:43 +02:00
Sergi Almacellas Abellana c95520b38a Concatenate cascade string to drop table before converting to SQL
issue10278
review332571002
2021-04-13 18:17:22 +02:00
Sergi Almacellas Abellana baa364f808 Only test column varchar size when set
issue10276
review338071003
2021-04-13 14:22:48 +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
Cédric Krier 012ca5824e Alter column type to change size on postgresql table
issue7331
2021-04-13 01:41:30 +02:00
Nicolas Évrard 2f08e73ba2 Escape identifiers in backend
issue10245
review317021002
2021-04-12 23:07:55 +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
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 246c672073 Remove unique constraint on ir.translation
issue8034
review46721002
2019-02-13 10:27:32 +01: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
Cédric Krier 8e9c476e6f Use correct number arguments in rename column warning
issue7688
review47701002
2018-09-28 17:24:01 +02: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 3547690d8b Allow SQL expression and where clause in index_action
issue7580
review46621002
2018-07-24 19:29:16 +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 7ae6a23128 Add non-standard exclude constraint in TableHandler definition
PostgreSQL does not include non-standard constraints in the
information_schema.table_constraints view.

issue7244
review37121002
2018-03-22 10:40:52 +01:00
Cédric Krier b3ca13748b Add Exclude constraint
issue1422
review44061002
2018-03-19 16:57:49 +01:00