SeaQL / sea-query

🔱 A dynamic SQL query builder for MySQL, Postgres and SQLite
https://www.sea-ql.org
Other
1.18k stars 195 forks source link

Move `sea-query-derive` into `sea-query-derive-internal`, making the internal logic can be reused #634

Closed billy1624 closed 1 year ago

billy1624 commented 1 year ago

PR Info

Changes

ikrivosheev commented 1 year ago

@billy1624, hello! Can add more context? I am working on merge sea-query-attr and sea-query-derive into one crate: sea-query-derive-v2. I can push my POC)

billy1624 commented 1 year ago

Hey @ikrivosheev, that was quick! Both your response and derive v2 PR! Actually, this PR is a POC for https://github.com/SeaQL/sea-orm/issues/1473. I will provide more context in a moment.

I can rebase this after you merged attr and derive crates. What I did here is merely:

  1. copy and paste, pop the internal logic into internal
  2. and rewrite existing sea_query::<SomeTrait> into <SomeCustomCratePath>::<SomeTrait> (e.g. sea_orm::sea_query::<SomeTrait>
tyt2y3 commented 1 year ago

Actually I think it might be better for SeaORM to have its own version instead of code sharing.

billy1624 commented 1 year ago

What's the concern?