latitude icon indicating copy to clipboard operation
latitude copied to clipboard

Queries cannot be modified once created

Open shadowhand opened this issue 7 years ago • 0 comments

Consolidating discussion from #71, #66, #58, #31 to document the plan for implementing modifications to queries. This applies mainly to SELECT but also other queries.

WIP: This issue will be modified until a clear plan is made.

Currently some methods in Latitude are additive and some are setters. For instance, columns() always changes the column list and join() always adds a new join. A full list:

method name add set
columns() x
addColumns() x
from() x
addFrom() x
join() x
where() x
andWhere() x
orWhere() x
groupBy() x
orderBy() x
limit() x
offset() x
having() x

Not all methods need to be additive and not all methods need to be setters. It should be possible to reset values that are additive.

shadowhand avatar May 21 '18 12:05 shadowhand