Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

COLLATION support in Fluent #725

Open
kavink opened this issue Apr 20, 2021 · 1 comment
Open

COLLATION support in Fluent #725

kavink opened this issue Apr 20, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@kavink
Copy link

kavink commented Apr 20, 2021

Are there any plans to support COLLATION in Fluent or Postgres-kit/MySQL-kit https://www.postgresql.org/docs/current/collation.html

I am trying to create a COLLATION during schema creation in the Migration script . Is there a way for me to do it ? I read about .custom but unable to make it work.

DB Fiddle: https://dbfiddle.uk/?rdbms=postgres_12&fiddle=e7945853a6501b4eb1ceea94da3e0b46
Schema:

create table versions (v1 varchar(20));

CREATE COLLATION en_natural (
   LOCALE = 'en-US-u-kn-true',
   PROVIDER = 'icu'
);

insert into versions values
('1.2'),
('1.23.231+b'),
('1.23.231+a'),
('1.23'),
('1.23.231-test.beta'),
('1.23.231-test.alpha'),
('1.23.45-rc.2+B001');

Query:

SELECT *
FROM versions ORDER BY v1 COLLATE en_natural desc;

Any examples would be helpful or some workaround to get it working.

@kavink kavink added the enhancement New feature or request label Apr 20, 2021
@0xTim
Copy link
Member

0xTim commented Aug 12, 2021

It's been discussed a few times, with the main issue that Fluent needs to generally support all the databases. A future version may potentially support it.

A raw migration is probably the best workaround

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants