Files
dbx/jet_columns.go
T
end 8053aafa6f refactor: use dialect-neutral Jet type aliases
Replace mysql/postgres intersection interfaces with mysql type aliases
per go-jet/jet#555 and generalize Apply/Expr signatures.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-29 17:47:56 -07:00

22 lines
439 B
Go

package dbx
import "github.com/go-jet/jet/v2/mysql"
// NormalCols processes a list of columns and strips out any that implement any of
// ColumnTimestamp, ColumnTime, or ColumnDate.
func NormalCols(cols ...Column) ColumnList {
res := make(ColumnList, 0)
for _, col := range cols {
switch col.(type) {
case mysql.ColumnTimestamp,
mysql.ColumnTime,
mysql.ColumnDate:
default:
res = append(res, col)
}
}
return res
}