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>
This commit is contained in:
+10
-19
@@ -1,24 +1,15 @@
|
||||
package dbx
|
||||
|
||||
import (
|
||||
"github.com/go-jet/jet/v2/mysql"
|
||||
"github.com/go-jet/jet/v2/postgres"
|
||||
)
|
||||
import "github.com/go-jet/jet/v2/mysql"
|
||||
|
||||
// Column is a union type for mysql.Column and postgres.Column
|
||||
type Column interface {
|
||||
mysql.Column
|
||||
postgres.Column
|
||||
}
|
||||
// Column is a dialect-neutral alias for Jet column expressions.
|
||||
type Column = mysql.Column
|
||||
|
||||
// ColumnList is a union type for mysql.ColumnList and postgres.ColumnList
|
||||
type ColumnList interface {
|
||||
mysql.ColumnList
|
||||
postgres.ColumnList
|
||||
}
|
||||
// ColumnList is a dialect-neutral alias for Jet column lists.
|
||||
type ColumnList = mysql.ColumnList
|
||||
|
||||
// BoolExpression is a union type for mysql.BoolExpression and postgres.BoolExpression
|
||||
type BoolExpression interface {
|
||||
mysql.BoolExpression
|
||||
postgres.BoolExpression
|
||||
}
|
||||
// Expression is a dialect-neutral alias for Jet SQL expressions.
|
||||
type Expression = mysql.Expression
|
||||
|
||||
// BoolExpression is a dialect-neutral alias for Jet boolean expressions.
|
||||
type BoolExpression = mysql.BoolExpression
|
||||
|
||||
Reference in New Issue
Block a user