mindplay-dk / sql

Database framework and query builder
Other
18 stars 6 forks source link

Clean up redundant line-builders #48

Open mindplay-dk opened 5 years ago

mindplay-dk commented 5 years ago

Many of the query-builders duplicate portions of building certain lines of various queries.

For example, the Conditions trait only builds the actual conditions, not the WHERE clause itself - every query-builder duplicates that part.

Change the internal API so the Conditions, Limit, Order, Range, Returning build complete lines. (or empty strings when they're empty.)

For consistency, follow the same pattern for query-specific lines internally in all query-builders.