Config for setting collation for attributes
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
没有指定文件或测试。首先追踪 Ash/Ecto 如何为 PostgreSQL 属性生成 ILIKE 过滤器,然后确定在不更改迁移的情况下,可以在哪里表示查询级排序规则。完成的标准是查询可以应用所请求的 COLLATE 表达式,并且能够与 Django 创建的非确定性排序规则一起工作,同时覆盖失败的过滤器用例。
由索引模型根据 Issue 内容生成。
描述
Code of Conduct
- I agree to follow this project's Code of Conduct
AI Policy
- I agree to follow this project's AI Policy, or I agree that AI was not used while creating this issue.
Is your feature request related to a problem? Please describe.
When working with a shared PostgreSQL database that's also used by Django (since Django 4.2's deprecation of CITextField), you can't use ilike filters anymore on columns that Django has set up with nondeterministic collations.
Django deprecated CITextField and now prefers setting db_collation on regular text fields to handle case-insensitive comparisons. The problem is that when Django creates a column with one of these nondeterministic collations, PostgreSQL throws errors if you try to use LIKE or ILIKE operators on those columns.
To Reproduce
Have a Django app that creates a table with a text field using db_collation for case-insensitive matching
Try to query that table from Ash/Ecto using an ILIKE filter
PostgreSQL will error because ILIKE doesn't work with nondeterministic collations
Describe the solution you'd like
It would be nice to have a way to specify a collation on an Ash attribute that gets applied at the query level (not in migrations - we can't change the column definition since that would break Django). Something that would generate SQL like:
WHERE column_name COLLATE "default" ILIKE '%search%'
This way Ash could work with Django's collation setup without modifying the actual column definitions.
Describe alternatives you've considered
No response
Additional context
No response
- 主要语言
- Elixir
- 星标
- 191
- 派生
- 186
- 平均合并
- 16 小时 4 分钟
- 30 天内合并 PR
- 17
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
ash-project/ash_postgres 的其他 Issue
-
Temporal: an update or destroy as of an instant doesn't carry into later versions可能已有人在做 @hoanle0126 于 13 天前认领。 未关闭
难度 5/5 一周以上 新手友好度 15/100
ash-project/ash_postgres#915 · 1 条评论 ·
维护者通常 1 天内回复
-
has_create_action?/1 excludes manual creates, making the #49 nullability fix inert on AshEvents resources可能重新可做 @Mckay-Hinds 于 18 天前认领,目前没有进行中的 PR。 未关闭
难度 3/5 1-2 天 新手友好度 76/100
ash-project/ash_postgres#851 · 9 条评论 ·
维护者通常 1 天内回复
-
bug
难度 4/5 3-5 天 新手友好度 35/100
ash-project/ash_postgres#642 · 5 条评论 ·
维护者通常 1 天内回复
-
enhancement
难度 5/5 一周以上 新手友好度 40/100
ash-project/ash_postgres#628 · 1 条评论 ·
维护者通常 1 天内回复
-
enhancement good first issue
难度 4/5 3-5 天 新手友好度 48/100
ash-project/ash_postgres#538 · 1 条评论 ·
维护者通常 1 天内回复
查看 ash-project/ash_postgres 的全部 Issue
相似的 Issue
-
@swmansion/popcorn: published .d.ts files lack extensions on relative imports, breaking moduleResolution node16/nodenext可能已有人在做 @Huyvux12 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
software-mansion/popcorn#929 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 85/100
ash-project/ash#3127 ·
维护者通常 1 天内回复
-
Bug: Table layout and date column are cut off on mobile screens on the Tournaments -> History page未关闭bug
难度 2/5 1-3 小时 新手友好度 74/100
hexlet-codebattle/codebattle#2375 ·
-
Bug
难度 2/5 1-3 小时 新手友好度 68/100
wintermeyer/vutuv#2388 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100