[Breakable] ColumnList is reverted to be a slice.
ColumnList(...) -> ColumnList{...}
IColumnList is removed.
This commit is contained in:
parent
4f86a77b2d
commit
799737d602
30 changed files with 217 additions and 105 deletions
|
|
@ -5,12 +5,8 @@ import "github.com/go-jet/jet/internal/jet"
|
|||
// Column is common column interface for all types of columns.
|
||||
type Column = jet.ColumnExpression
|
||||
|
||||
// IColumnList is used to store list of columns for later reuse as single projection or
|
||||
// column list for UPDATE and INSERT statement.
|
||||
type IColumnList = jet.IColumnList
|
||||
|
||||
// ColumnList function returns list of columns that be used as projection or column list for UPDATE and INSERT statement.
|
||||
var ColumnList = jet.ColumnList
|
||||
type ColumnList = jet.ColumnList
|
||||
|
||||
// ColumnBool is interface for SQL boolean columns.
|
||||
type ColumnBool = jet.ColumnBool
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ INSERT INTO db.table1 (col1) VALUES
|
|||
}
|
||||
|
||||
func TestInsertWithColumnList(t *testing.T) {
|
||||
columnList := ColumnList(table3ColInt, table3StrCol)
|
||||
columnList := ColumnList{table3ColInt, table3StrCol}
|
||||
|
||||
assertStatementSql(t, table3.INSERT(columnList).VALUES(1, 3), `
|
||||
INSERT INTO db.table3 (col_int, col2) VALUES
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ func TestInvalidSelect(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestSelectColumnList(t *testing.T) {
|
||||
columnList := ColumnList(table2ColInt, table2ColFloat, table3ColInt)
|
||||
columnList := ColumnList{table2ColInt, table2ColFloat, table3ColInt}
|
||||
|
||||
assertStatementSql(t, SELECT(columnList).FROM(table2), `
|
||||
SELECT table2.col_int AS "table2.col_int",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue