Project: NeuVector (Provisioning / Security & Compliance)
File: HISTORY.md

- - - - - , , - , - - - , - - Update golangci-lint and updates for all associated linters Update dependencies github.com/DATA-DOG/go-sqlmock v1.3.3 -> v1.5.0 github.com/denisenkom/go-mssqldb v0.0.0-20200206145737-bbfc9a55622e -> v0.10.0 github.com/go-sql-driver/mysql v1.4.1 -> v1.6.0 github.com/lib/pq v1.2.0 -> v1.10.1 github.com/mattn/go-sqlite3 v1.11.0 -> v1.14.7 github.com/stretchr/testify -> v1.4.0 -> v1.7.0 - , - - - , - , - - - - Fix all formatting for golangci-lint Move to golangci-lint github action , - - - Changed `NULL`, `TRUE`, `FALSE` to not be interpolated when creating prepared statements. , - Updated dependencies `github.com/lib/pq v1.1.1 -> v1.2.0` `github.com/mattn/go-sqlite3 v1.10.0 -> v1.11.0` `github.com/stretchr/testify v1.3.0 -> v1.4.0` and - - Created new `sqlgen` module to encapsulate sql generation Broke SQLDialect inti new SQL generators for each statement type. Test refactor Moved to a test case pattern to allow for quickly adding new test cases. and - - Test clean up and more testing pattern consistency Changed to use assertion methods off of suite Updated Equals assertions to have expected output first Increase overall test coverage. * 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. 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 SELECT `goqu.Insert`, `Database#Insert`, `DialectWrapper#Insert` - Create INSERT `goqu.Update`, `Database#db.Update`, `DialectWrapper#Update` - Create UPDATE `goqu.Delete`, `Database#Delete`, `DialectWrapper#Delete` - Create DELETE `goqu.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. - - When a slice that is `sql.RawBytes`, `*[]byte` or `sql.Scanner` no errors will be returned. Fix issue where structs with pointer fields where not set properly and - Linting Add linting checks and fixed errors Renamed all snake_case variables to be camelCase. Fixed examples to always map to a defined method Renamed `adapters` to `dialect` to more closely match their intended

API Changes Updated all sql generations methods to from `Sql` to `SQL` `ToSql` -> `ToSQL` `ToInsertSql` -> `ToInsertSQL` `ToUpdateSql` -> `ToUpdateSQL` `ToDeleteSql` -> `ToDeleteSQL` `ToTruncateSql` -> `ToTruncateSQL` Abstracted out `dialect_options` from the adapter to make the dialect self contained. This also removed the dataset<->adapter co dependency making the dialect self contained. Refactored the `goqu.I` method. Added new `goqu.S`, `goqu.T` and `goqu.C` methods to clarify why type of identifier you are using. `goqu.I` should only be used when you have a qualified identifier (e.g. `goqu.I("myschema.mytable.my_col") Added new `goqu.Dialect` method to make using `goqu` as an SQL builder easier. Internal Changes Pulled expressions into their own package Broke up expressions.go into multiple files to make working with and defining them easier. Moved the user facing methods into the main `goqu` to keep the same API as before. Added more examples Moved non-user facing structs and interfaces to internal modules to clean up API. Increased test coverage. Handle nil time.Time Literal and - and Add ability to change column rename function - Updated go support to `1.10`, `1.11` and `1.12` Change testify dependency from c2fo/testify back to stretchr/testify. Add support for "FOR UPDATE" and "SKIP LOCKED" - Changed to use go modules Drop go 1.6 support, supported versions are `1.8`, `1.9` and latest Add context support - Add support for ON CONFLICT when using a dataset - Support for defining WITH clauses for Common Table Expressions (CTE) - Prepared(true) issues when using IS NULL comparisson operation - Add `upsert` support via `InsertIgnore` and `InsertConflict` methods - - Adding vendor dependencies and updating tests to run in docker containers - Add range clauses ( - Readmefix - Bugfix for chained Where() - Fixing ScanStruct issue with embedded pointers in crud_exec - Fixing race condition with structmapcache in crud_exec - , Version 3.1 - Fix an issue with a nil pointer access on the inserts and updates. Allowing ScanStructs to take a struct with an embedded pointer to a struct. Change to check if struct is Anonymous when recursing through an embedded struct. Updated to use the latest version of github.com/DATA-DOG/go-sqlmock. Add literal bytes and update to c2fo testify - Added support for embedded structs when inserting or updating. - Fixed issue with transient columns and the auto select of columns. Changed references to "github.com/doug-martin/goqu" to "gopkg.in/doug-martin/goqu.v2" Fixed issue when `ScanStruct(s)` was used with `SelectDistinct` and caused a panic. When scanning a struct or slice of structs, the struct(s) will be parsed for the column names to select. - You can now passed an IdentiferExpression to `As` - Added info about installation through Fixed issue setting Logger when starting a new transaction. Changed sql generation methods to use a common naming convention. `To(Sql|Insert|Update|Delete)` Also changed to have common return values `string, []interface{}, error)` Added `Dataset.Prepared` which allows a user to specify whether or not SQL should be interpolated. Updated Docs More examples Increased test coverage. Changed `CrudExec` to not wrap driver errors in a GoquError Added ability to use a dataset in an `Ex` map or `Eq` expression without having to use `In` `db.From("test").Where(goqu.Ex{"a": db.From("test").Select("b")})` Updated readme with links to Added SQLite3 adapter - Added: * More tests and examples Added CONTRIBUTING.md Added LICENSE information Removed godoc introduction in favor of just maintaining the README. Fixed issue with goqu.New not returning a pointer to a Database Initial release