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

Be able to support Array in database #576

Closed
hf29h8sh321 opened this issue Mar 4, 2022 · 14 comments · Fixed by #1132
Closed

Be able to support Array in database #576

hf29h8sh321 opened this issue Mar 4, 2022 · 14 comments · Fixed by #1132
Assignees
Milestone

Comments

@hf29h8sh321
Copy link

hf29h8sh321 commented Mar 4, 2022

Summary

Be able to directly support Array in database

Such as text[]

Additional Information

Right now it is represented by a custom column_type = "Custom(\"array\".to_owned())" and the type in struct is String, not Vec<T>

@billy1624
Copy link
Member

Hey @hf29h8sh321, I assumed you mean supporting Array of some permitives for PostgreSQL?

@hf29h8sh321
Copy link
Author

@billy1624 For example, Vec<String>

@billy1624
Copy link
Member

Okay, this has been discussed before

@tyt2y3
Copy link
Member

tyt2y3 commented Mar 31, 2022

This depends on SeaQL/sea-query#225

@EtienneProthon
Copy link

Could we have an example of the workaround using Json type for the moment ? I need to store and array of enum and i can't find any example on array storage as json.

@billy1624
Copy link
Member

Hey @EtienneProthon, please check #783

@negezor
Copy link
Contributor

negezor commented Jun 14, 2022

This is the only thing that prevents me from using sea-orm right now, because I need to work with the postgres array. I can't change the array to JSON in my tables. Is there a workaround to use an array without JSON? I'm interested in an int8 array.

@kudlatyamroth
Copy link

and array support was merged in sea-query: SeaQL/sea-query#467 :)

@ikrivosheev
Copy link
Member

@kudlatyamroth and released)

@kudlatyamroth
Copy link

@ikrivosheev in release 0.27 info there is no mention about it :)
so i assume that it was not included in 0.27, but if it is, its great news :)

@ikrivosheev
Copy link
Member

@kudlatyamroth thank! I will edit Changelog!

@emmiegit
Copy link
Contributor

Exciting! What is needed for sea-orm to support it now that sea-query has it?

@ikrivosheev
Copy link
Member

@emmiegit you can look here: #985

@billy1624 billy1624 added this to the 0.10.x milestone Oct 18, 2022
@billy1624 billy1624 self-assigned this Oct 19, 2022
@billy1624 billy1624 moved this from Triage to In Progress in SeaQL Dev Tracker Oct 19, 2022
@billy1624 billy1624 moved this from In Progress to Review in SeaQL Dev Tracker Oct 19, 2022
@billy1624
Copy link
Member

Hey everyone, please check #1132

@billy1624 billy1624 moved this from Review to Done in SeaQL Dev Tracker Nov 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

8 participants