1.6 KiB
1.6 KiB
Changelog
v6
types.Resultis renamed toorm.Result.- Added
OnQueryProcessedevent that can be used to log / report queries timing. Query logger is removed. orm.URLValuesis renamed toorm.URLFilters. It no longer adds ORDER clause.orm.Pageris renamed toorm.Pagination.- Support for net.IP and net.IPNet.
- Support for context.Context.
- Bulk/multi updates.
- Query.WhereGroup for enclosing conditions in paretheses.
v5
- All fields are nullable by default.
,nulltag is replaced with,notnull. Result.Affectedrenamed toResult.RowsAffected.- Added
Result.RowsReturned. Createrenamed toInsert,BeforeCreatetoBeforeInsert,AfterCreatetoAfterInsert.- Indexed placeholders support, e.g.
db.Exec("SELECT ?0 + ?0", 1). - Named placeholders are evaluated when query is executed.
- Added Update and Delete hooks.
- Order reworked to quote column names. OrderExpr added to bypass Order quoting restrictions.
- Group reworked to quote column names. GroupExpr added to bypass Group quoting restrictions.
v4
Options.HostandOptions.Portmerged intoOptions.Addr.- Added
Options.MaxRetries. Now queries are not retried by default. LoadIntorenamed toScan,ColumnLoaderrenamed toColumnScanner, LoadColumn renamed to ScanColumn,NewRecord() interface{}changed toNewModel() ColumnScanner,AppendQuery(dst []byte) []bytechanged toAppendValue(dst []byte, quote bool) ([]byte, error).- Structs, maps and slices are marshalled to JSON by default.
- Added support for scanning slices, .e.g. scanning
[]int. - Added object relational mapping.