auraphp / Aura.SqlQuery

Independent query builders for MySQL, PostgreSQL, SQLite, and Microsoft SQL Server.
MIT License
452 stars 86 forks source link

Db platform constants #156

Closed simPod closed 6 years ago

simPod commented 6 years ago

I'd like to reference those constants in my project, it's more safe as constants than raw strings

Also, removed unnecessary complexity from QueryFactory constructor

harikt commented 6 years ago

Why not extend the QueryFactory ? Is there any problem with it ? As these constants are not used by Aura.SqlQuery itself I wonder whether it is really needed here.

harikt commented 6 years ago

I also noticed you send this https://github.com/doctrine/dbal/pull/2986 to doctrine. Is there any specific thing you are looking from these PR's ?

simPod commented 6 years ago

Well, I think there would be no point in extending. I could specify those constants somewhere aside but I was thinking it might be useful to add them to these two packages. Especially here, I think it's better to pass constant with platform name rather than simple string.

I'm mapping this package to DBAL so I need to create a map using those constants, not simple strings if possible. However, my current solution uses strings only and waits if these will be merged or not :)