- All fields are nullable by default.
,null
tag is replaced with,notnull
. Result.Affected
renamed toResult.RowsAffected
.- Added
Result.RowsReturned
. Create
renamed toInsert
,BeforeCreate
toBeforeInsert
,AfterCreate
toAfterInsert
.- 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.
Options.Host
andOptions.Port
merged intoOptions.Addr
.- Added
Options.MaxRetries
. Now queries are not retried by default. LoadInto
renamed toScan
,ColumnLoader
renamed toColumnScanner
, LoadColumn renamed to ScanColumn,NewRecord() interface{}
changed toNewModel() ColumnScanner
,AppendQuery(dst []byte) []byte
changed 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.