Tryton Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(81)

Issue 361251002: tryton-env: Remove index management from field definition

Can't Edit
Can't Publish+Mail
Start Review
Created:
1 year, 4 months ago by nicoe
Modified:
2 weeks, 2 days ago
Reviewers:
reviewbot, yangoon, ced, dave, albert
Visibility:
Public.

Description

Patch Set 1 #

Patch Set 2 : Add CHANGELOG #

Total comments: 7

Patch Set 3 : Use a declarative API for index specification #

Total comments: 1

Patch Set 4 : Move index creation at the end of the update #

Patch Set 5 : Use a more flexible design regarding Usage option and Combination #

Patch Set 6 : Fix index creation #

Total comments: 29

Patch Set 7 : Fix some remarks #

Patch Set 8 : Update to tip and move extension check to Database #

Patch Set 9 : Fix SQLite implementation #

Total comments: 56

Patch Set 10 : Update to tip + fix remarks #

Patch Set 11 : Update to tip #

Total comments: 105

Patch Set 12 : Made Index and Usage hashable + fix remarks #

Unified diffs Side-by-side diffs Delta from patch set Stats (+595 lines, -308 lines) Patch
M trytond/CHANGELOG View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M trytond/trytond/backend/database.py View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +10 lines, -0 lines 0 comments Download
M trytond/trytond/backend/postgresql/database.py View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +18 lines, -0 lines 0 comments Download
M trytond/trytond/backend/postgresql/table.py View 1 2 3 4 5 6 7 8 9 10 11 6 chunks +155 lines, -71 lines 0 comments Download
M trytond/trytond/backend/sqlite/table.py View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +43 lines, -64 lines 0 comments Download
M trytond/trytond/backend/table.py View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +31 lines, -11 lines 0 comments Download
M trytond/trytond/ir/action.py View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +11 lines, -11 lines 0 comments Download
M trytond/trytond/ir/cron.py View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +5 lines, -2 lines 0 comments Download
M trytond/trytond/ir/email_.py View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -2 lines 0 comments Download
M trytond/trytond/ir/error.py View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +8 lines, -2 lines 0 comments Download
M trytond/trytond/ir/export.py View 1 chunk +1 line, -1 line 0 comments Download
M trytond/trytond/ir/model.py View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +20 lines, -11 lines 0 comments Download
M trytond/trytond/ir/module.py View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +2 lines, -2 lines 0 comments Download
M trytond/trytond/ir/queue_.py View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +11 lines, -12 lines 0 comments Download
M trytond/trytond/ir/resource.py View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +10 lines, -2 lines 0 comments Download
M trytond/trytond/ir/rule.py View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +20 lines, -7 lines 0 comments Download
M trytond/trytond/ir/session.py View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +8 lines, -9 lines 0 comments Download
M trytond/trytond/ir/translation.py View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +22 lines, -6 lines 0 comments Download
M trytond/trytond/ir/trigger.py View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +15 lines, -10 lines 0 comments Download
M trytond/trytond/ir/ui/icon.py View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +9 lines, -2 lines 0 comments Download
M trytond/trytond/ir/ui/menu.py View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
M trytond/trytond/ir/ui/view.py View 1 2 3 4 5 6 7 8 9 10 11 9 chunks +38 lines, -20 lines 0 comments Download
M trytond/trytond/model/fields/binary.py View 1 2 3 4 5 6 7 8 9 10 2 chunks +2 lines, -2 lines 0 comments Download
M trytond/trytond/model/fields/boolean.py View 1 chunk +2 lines, -2 lines 0 comments Download
M trytond/trytond/model/fields/char.py View 1 2 3 4 5 6 7 2 chunks +2 lines, -2 lines 0 comments Download
M trytond/trytond/model/fields/date.py View 1 2 3 4 5 6 7 8 9 10 6 chunks +6 lines, -6 lines 0 comments Download
M trytond/trytond/model/fields/dict.py View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -3 lines 0 comments Download
M trytond/trytond/model/fields/field.py View 1 2 3 4 5 6 7 8 9 10 3 chunks +1 line, -3 lines 0 comments Download
M trytond/trytond/model/fields/float.py View 1 2 3 4 5 6 7 8 9 10 2 chunks +2 lines, -2 lines 0 comments Download
M trytond/trytond/model/fields/many2one.py View 1 2 3 4 5 6 7 8 9 10 2 chunks +2 lines, -2 lines 0 comments Download
M trytond/trytond/model/fields/multiselection.py View 1 2 3 4 5 6 7 2 chunks +2 lines, -2 lines 0 comments Download
M trytond/trytond/model/fields/reference.py View 1 2 3 4 5 6 7 8 9 10 2 chunks +2 lines, -2 lines 0 comments Download
M trytond/trytond/model/fields/selection.py View 1 2 3 4 5 6 7 2 chunks +2 lines, -2 lines 0 comments Download
A trytond/trytond/model/index.py View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +47 lines, -0 lines 0 comments Download
M trytond/trytond/model/modelsql.py View 1 2 3 4 5 6 7 8 9 10 11 6 chunks +17 lines, -5 lines 0 comments Download
M trytond/trytond/modules/__init__.py View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +24 lines, -0 lines 0 comments Download
M trytond/trytond/res/group.py View 1 2 1 chunk +1 line, -1 line 0 comments Download
M trytond/trytond/res/ir.py View 1 2 3 4 5 6 7 8 9 10 6 chunks +11 lines, -11 lines 0 comments Download
M trytond/trytond/res/user.py View 1 2 3 4 5 6 7 8 9 10 11 7 chunks +25 lines, -11 lines 0 comments Download
M trytond/trytond/tests/mptt.py View 1 chunk +3 lines, -4 lines 0 comments Download
M trytond/trytond/tests/path.py View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 37
nicoe
1 year, 4 months ago (2021-02-26 17:58:35 UTC) #1
nicoe
1 year, 4 months ago (2021-02-26 18:00:57 UTC) #2
reviewbot
flake8 OK URL: https://codereview.tryton.org/361251002
1 year, 4 months ago (2021-02-26 18:18:59 UTC) #3
albert
https://codereview.tryton.org/361251002/diff/341541002/trytond/trytond/backend/table.py File trytond/trytond/backend/table.py (right): https://codereview.tryton.org/361251002/diff/341541002/trytond/trytond/backend/table.py#newcode193 trytond/trytond/backend/table.py:193: :param table: The table of which the index is ...
1 year, 4 months ago (2021-02-26 22:02:46 UTC) #4
dave
On 2021/02/26 22:02:46, albert wrote: > https://codereview.tryton.org/361251002/diff/341541002/trytond/trytond/backend/table.py > File trytond/trytond/backend/table.py (right): > > https://codereview.tryton.org/361251002/diff/341541002/trytond/trytond/backend/table.py#newcode193 > ...
1 year, 4 months ago (2021-02-27 18:48:09 UTC) #5
nicoe
10 months, 1 week ago (2021-08-30 07:09:55 UTC) #6
nicoe
https://codereview.tryton.org/361251002/diff/371671002/trytond/trytond/backend/postgresql/database.py File trytond/trytond/backend/postgresql/database.py (right): https://codereview.tryton.org/361251002/diff/371671002/trytond/trytond/backend/postgresql/database.py#newcode885 trytond/trytond/backend/postgresql/database.py:885: Database.index_translators.append(SimilarityTranslator) I wonder if as we support natively unaccent ...
10 months, 1 week ago (2021-08-30 07:33:19 UTC) #7
nicoe
10 months ago (2021-09-03 16:37:42 UTC) #8
reviewbot
https://codereview.tryton.org/361251002/diff/373491003/trytond/trytond/backend/sqlite/database.py#newcode29 trytond/trytond/backend/sqlite/database.py:29: 'trytond.backend.SimilarityIndex' imported but unused https://codereview.tryton.org/361251002/diff/373491003/trytond/trytond/ir/queue.py#newcode42 trytond/trytond/ir/queue.py:42: the backslash is redundant between brackets https://codereview.tryton.org/361251002/diff/373491003/trytond/trytond/ir/queue.py#newcode43 ...
10 months ago (2021-09-03 17:07:03 UTC) #9
nicoe
10 months ago (2021-09-07 17:19:30 UTC) #10
reviewbot
https://codereview.tryton.org/361251002/diff/352681002/trytond/trytond/backend/sqlite/database.py#newcode29 trytond/trytond/backend/sqlite/database.py:29: 'trytond.backend.SimilarityIndex' imported but unused https://codereview.tryton.org/361251002/diff/352681002/trytond/trytond/ir/queue.py#newcode42 trytond/trytond/ir/queue.py:42: the backslash is redundant between brackets https://codereview.tryton.org/361251002/diff/352681002/trytond/trytond/ir/queue.py#newcode43 ...
10 months ago (2021-09-07 17:30:00 UTC) #11
nicoe
10 months ago (2021-09-08 15:47:13 UTC) #12
reviewbot
https://codereview.tryton.org/361251002/diff/365911002/trytond/trytond/backend/postgresql/database.py#newcode36 trytond/trytond/backend/postgresql/database.py:36: 'sql.Literal' imported but unused https://codereview.tryton.org/361251002/diff/365911002/trytond/trytond/backend/sqlite/database.py#newcode29 trytond/trytond/backend/sqlite/database.py:29: 'trytond.backend.SimilarityIndex' imported but unused https://codereview.tryton.org/361251002/diff/365911002/trytond/trytond/ir/queue.py#newcode42 trytond/trytond/ir/queue.py:42: the ...
10 months ago (2021-09-08 16:01:38 UTC) #13
ced
https://codereview.tryton.org/361251002/diff/341541002/trytond/trytond/backend/postgresql/table.py File trytond/trytond/backend/postgresql/table.py (right): https://codereview.tryton.org/361251002/diff/341541002/trytond/trytond/backend/postgresql/table.py#newcode414 trytond/trytond/backend/postgresql/table.py:414: 'name': self.name, The name of the index should also ...
9 months ago (2021-10-03 19:40:06 UTC) #14
yangoon
8 months, 3 weeks ago (2021-10-15 19:34:39 UTC) #15
nicoe
7 months, 3 weeks ago (2021-11-10 09:53:31 UTC) #16
nicoe
https://codereview.tryton.org/361251002/diff/365911002/trytond/CHANGELOG File trytond/CHANGELOG (right): https://codereview.tryton.org/361251002/diff/365911002/trytond/CHANGELOG#newcode1 trytond/CHANGELOG:1: * Remove index management from field definition On 2021/10/03 ...
7 months, 3 weeks ago (2021-11-10 09:53:33 UTC) #17
reviewbot
patch is not applicable URL: https://codereview.tryton.org/361251002
7 months, 3 weeks ago (2021-11-10 10:14:36 UTC) #18
ced
https://codereview.tryton.org/361251002/diff/365911002/trytond/trytond/backend/__init__.py File trytond/trytond/backend/__init__.py (right): https://codereview.tryton.org/361251002/diff/365911002/trytond/trytond/backend/__init__.py#newcode15 trytond/trytond/backend/__init__.py:15: 'IndexRequest', 'EqualityIndex', 'RangeIndex', 'SimilarityIndex'] On 2021/11/10 09:53:31, nicoe wrote: ...
7 months, 3 weeks ago (2021-11-10 10:18:12 UTC) #19
nicoe
https://codereview.tryton.org/361251002/diff/365911002/trytond/trytond/backend/__init__.py File trytond/trytond/backend/__init__.py (right): https://codereview.tryton.org/361251002/diff/365911002/trytond/trytond/backend/__init__.py#newcode26 trytond/trytond/backend/__init__.py:26: class IndexUsage: On 2021/11/10 10:18:11, ced wrote: > On ...
5 months ago (2022-02-03 22:14:55 UTC) #20
nicoe
5 months ago (2022-02-03 22:14:56 UTC) #21
reviewbot
patch is not applicable URL: https://codereview.tryton.org/361251002
5 months ago (2022-02-03 22:19:00 UTC) #22
nicoe
4 months, 4 weeks ago (2022-02-07 10:08:26 UTC) #23
reviewbot
patch is not applicable URL: https://codereview.tryton.org/361251002
4 months, 4 weeks ago (2022-02-07 10:31:45 UTC) #24
ced
I'm wondering if we should not keep the select=True or to automatically add an index ...
4 months, 1 week ago (2022-02-22 19:11:07 UTC) #25
nicoe
https://codereview.tryton.org/361251002/diff/386021002/trytond/trytond/backend/database.py File trytond/trytond/backend/database.py (right): https://codereview.tryton.org/361251002/diff/386021002/trytond/trytond/backend/database.py#newcode293 trytond/trytond/backend/database.py:293: chosen_translator = translator On 2022/02/22 19:11:06, ced wrote: > ...
3 months, 3 weeks ago (2022-03-10 21:04:16 UTC) #26
nicoe
On 2022/02/22 19:11:07, ced wrote: > I'm wondering if we should not keep the select=True ...
3 months, 3 weeks ago (2022-03-10 21:06:56 UTC) #27
nicoe
3 months, 3 weeks ago (2022-03-10 21:07:14 UTC) #28
reviewbot
https://codereview.tryton.org/361251002/diff/386211002/trytond/trytond/backend/database.py#newcode3 trytond/trytond/backend/database.py:3: 'hashlib' imported but unused https://codereview.tryton.org/361251002/diff/386211002/trytond/trytond/backend/postgresql/table.py#newcode6 trytond/trytond/backend/postgresql/table.py:6: 'psycopg2.sql.Composed' imported but unused https://codereview.tryton.org/361251002/diff/386211002/trytond/trytond/ir/queue.py#newcode43 trytond/trytond/ir/queue.py:43: continuation ...
3 months, 3 weeks ago (2022-03-10 21:33:23 UTC) #29
nicoe
1 month, 3 weeks ago (2022-05-14 20:38:53 UTC) #30
reviewbot
https://codereview.tryton.org/361251002/diff/419151003/trytond/trytond/backend/database.py#newcode3 trytond/trytond/backend/database.py:3: 'hashlib' imported but unused https://codereview.tryton.org/361251002/diff/419151003/trytond/trytond/backend/postgresql/table.py#newcode6 trytond/trytond/backend/postgresql/table.py:6: 'psycopg2.sql.Composed' imported but unused https://codereview.tryton.org/361251002/diff/419151003/trytond/trytond/ir/queue_.py#newcode43 trytond/trytond/ir/queue_.py:43: continuation ...
1 month, 3 weeks ago (2022-05-14 21:01:56 UTC) #31
ced
On 2022/03/10 21:06:56, nicoe wrote: > On 2022/02/22 19:11:07, ced wrote: > > I'm wondering ...
3 weeks, 5 days ago (2022-06-09 11:48:10 UTC) #32
ced
Missing documentation. https://codereview.tryton.org/361251002/diff/386021002/trytond/trytond/model/modelsql.py File trytond/trytond/model/modelsql.py (right): https://codereview.tryton.org/361251002/diff/386021002/trytond/trytond/model/modelsql.py#newcode188 trytond/trytond/model/modelsql.py:188: cls._indexes = {} On 2022/03/10 21:04:16, nicoe ...
3 weeks, 5 days ago (2022-06-09 11:55:50 UTC) #33
ced
https://codereview.tryton.org/361251002/diff/419151003/trytond/trytond/backend/table.py File trytond/trytond/backend/table.py (right): https://codereview.tryton.org/361251002/diff/419151003/trytond/trytond/backend/table.py#newcode226 trytond/trytond/backend/table.py:226: def sql(cls, request): I think it should return a ...
3 weeks, 3 days ago (2022-06-11 08:13:14 UTC) #34
nicoe
https://codereview.tryton.org/361251002/diff/386021002/trytond/trytond/model/modelsql.py File trytond/trytond/model/modelsql.py (right): https://codereview.tryton.org/361251002/diff/386021002/trytond/trytond/model/modelsql.py#newcode188 trytond/trytond/model/modelsql.py:188: cls._indexes = {} On 2022/06/09 11:55:47, ced wrote: > ...
2 weeks, 4 days ago (2022-06-17 16:35:33 UTC) #35
nicoe
2 weeks, 4 days ago (2022-06-17 16:57:51 UTC) #36
reviewbot
2 weeks, 4 days ago (2022-06-17 17:00:52 UTC) #37
https://codereview.tryton.org/361251002/diff/413311003/trytond/trytond/backen...
trytond/trytond/backend/postgresql/table.py:6:
'psycopg2.sql.Composed' imported but unused

https://codereview.tryton.org/361251002/diff/413311003/trytond/trytond/model/...
trytond/trytond/model/modelsql.py:568:
import 'index' from line 27 shadowed by loop variable


URL: https://codereview.tryton.org/361251002
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld d9ca037-tainted