init - add project files
This commit is contained in:
13
tools/jet-2.12.0/internal/jet/date_expression_test.go
Normal file
13
tools/jet-2.12.0/internal/jet/date_expression_test.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package jet
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestDateArithmetic(t *testing.T) {
|
||||
timestamp := Timestamp(2000, 1, 1, 0, 0, 0)
|
||||
assertClauseDebugSerialize(t, table1ColDate.ADD(NewInterval(String("1 HOUR"))).EQ(timestamp),
|
||||
"((table1.col_date + INTERVAL '1 HOUR') = '2000-01-01 00:00:00')")
|
||||
assertClauseDebugSerialize(t, table1ColDate.SUB(NewInterval(String("1 HOUR"))).EQ(timestamp),
|
||||
"((table1.col_date - INTERVAL '1 HOUR') = '2000-01-01 00:00:00')")
|
||||
}
|
||||
Reference in New Issue
Block a user