Releases: doug-martin/goqu
Releases · doug-martin/goqu
v8.3.1
v8.3.0
v8.2.2
v8.2.1
v8.2.0
- [FIX] Fix reflection errors related to nil pointers and unexported fields #118
- Unexported fields are ignored when creating a columnMap
- Nil embedded pointers will no longer cause a panic
- Fields on nil embedded pointers will be ignored when creating update or insert statements.
- [ADDED] You can now ingore embedded structs and their fields by using
db:"-"
tag on the embedded struct.
v8.1.0
v8.0.1
v8.0.0
A major change the the API was made in v8
to seperate concerns between the different SQL statement types.
Why the change?
- There were feature requests that could not be cleanly implemented with everything in a single dataset.
- Too much functionality was encapsulated in a single datastructure.
- It was unclear what methods could be used for each SQL statement type.
- Changing a feature for one statement type had the possiblity of breaking another statement type.
- Test coverage was decent but was almost solely concerned about SELECT statements, breaking them up allowed for focused testing on each statement type.
- Most the SQL generation methods (
ToInsertSQL
,ToUpdateSQL
etc.) took arguments which lead to an ugly API that was not uniform for each statement type, and proved to be inflexible.
What Changed
There are now five dataset types, SelectDataset
, InsertDataset
, UpdateDataset
, DeleteDataset
and TruncateDataset
Each dataset type has its own entry point.
goqu.From
,Database#From
,DialectWrapper#From
- Create SELECTgoqu.Insert
,Database#Insert
,DialectWrapper#Insert
- Create INSERTgoqu.Update
,Database#db.Update
,DialectWrapper#Update
- Create UPDATEgoqu.Delete
,Database#Delete
,DialectWrapper#Delete
- Create DELETEgoqu.Truncate
,Database#Truncate
,DialectWrapper#Truncate
- Create TRUNCATE
ToInsertSQL
, ToUpdateSQL
, ToDeleteSQL
, and ToTruncateSQL
(and variations of them) methods have been removed from the SelectDataset
. Instead use the ToSQL
methods on each dataset type.
Each dataset type will have an Executor
and ToSQL
method so a common interface can be created for each type.