Dialect refactor improvements and clean up.

This commit is contained in:
go-jet 2019-08-06 10:29:04 +02:00
parent 23fd973699
commit 647ef21aaf
52 changed files with 1097 additions and 671 deletions

21
postgres/operators.go Normal file
View file

@ -0,0 +1,21 @@
package postgres
import "github.com/go-jet/jet/internal/jet"
// --------- Arithmetic operators -------------//
//var MINUSi = jet.MINUSi
var MINUSf = jet.MINUSf
//----------- Logical operators ---------------//
var NOT = jet.NOT
var BIT_NOT = jet.BIT_NOT
func MINUSi(intExp IntegerExpression) IntegerExpression {
if intLit, ok := intExp.(jet.LiteralExpression); ok {
intLit.SetConstant(true)
}
return intExp
}