Releases: xgfone/go-sqlx
Releases · xgfone/go-sqlx
v0.14.0
- Added:
- The type
Time
supports to customize the format when marshal it tostring
tojson
. - The
Struct
functions of theINSERT
andSELECT
statement support the anonymous field, such astype Anonym struct { Field1 string Field2 int } type Data struct { Anonym Field3 string Field4 string }
- The type
- Changed:
- Remove the function
Table
and useTable
as the struct type to represent a db table.
- Remove the function
v0.13.0
v0.12.0
- Added:
- Add the type
Column
as the column of the SQL table. - Add the convenient methods
BindRowXxx
for the typeSelectBuilder
.
- Add the type
- Changed:
SelectStruct
no longer supports the tagtable
.- Add the new method
Clone
for the interfaceValuer
. - Change the parameter
Order
of the methodOrderBy
from optional to required. - Rename the functions
Incr
toInc
,Decr
toDec
, andColumn
toColumnCond
.
v0.11.2
v0.11.1
v0.11.0
- Added:
- Add the support of the
JOIN
statement forDELETE
statement. - Add the support of the
FROM
andJOIN
statements forUPDATE
statement. - Add the methods
ExecContext
,QueryContext
andQueryRowContext
for DB to resolve ambiguity aboutExecutor
methods.
- Add the support of the
- Changed:
SELECT JOIN
uses the new syntaxJoinOn
.UpdateBuilder.Table()
supports the table alias.Delete()
supports the tables argument to set the deleted tables.SelectStruct()
supports the table name as the second optional argument.
v0.10.0
- Added:
- Add the alias
Set
ofAssign
. - Add the new type
Bool
to scan the sql BOOLEAN value. - Add the new type
NamedArgs
to support a set of NamedArgs. - Add the new method
BindRows
andBindRowsContext
forSelectBuilder
to scan the rows into the slice. - Add the new method
WhereNamedArgs
to support the interfaceNamedArg
for theWhere
statement. - Add the new method
SetNameArg
andSetMoreNamedArg
forUpdateBuilder
to support the interfaceNamedArg
. - Add the ASC and DESC short for
OrderBy
ofSelectBuilder
, likeOrderByDesc
andOrderByAsc
. - Add some short aliases of
ConditionSet
, likeEq
,NotEq
,Gt
,GtEq
,Le
,LeEq
, etc.
- Add the alias
- Changed:
- Rename the type
Setters
toSetterSet
. - Rename the type
Conditions
toConditionSet
. - Add the table argument for
Update()
andNewUpdateBuilder()
. - Add the new method
NamedArg() sql.NamedArg
for the interfaceNamedArg
.
- Rename the type