loco-rs / loco

🚂 🦀 The one-person framework for Rust for side-projects and startups
https://loco.rs
Apache License 2.0
3.59k stars 153 forks source link

Adding `ilike` to model query dsl #529

Open kaplanelad opened 2 months ago

kaplanelad commented 2 months ago

Add ilike function in query dsl.

ilike not_ilike ilike_starts_with ilike_ends_with ilike_contains

yinho999 commented 2 months ago

@kaplanelad would you mind assigning this ticket to me, please?

kaplanelad commented 2 months ago

Thanks @yinho999, did it. Please note that like is working only when the engine is postgres. maybe we can add a switch case to support also mysql

yinho999 commented 1 month ago

Thanks @yinho999, did it. Please note that like is working only when the engine is postgres. maybe we can add a switch case to support also mysql

Should we create a common trait ConditionBuilderTrait which has 3 different implementations of ConditionBuilder (SQLite, MySQL, Postgres)? We can enable each of them by feature flag

yinho999 commented 1 month ago

@kaplanelad Similar to this file which contains a different variant of databases but uses the same trait. Database variant