-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample_main_temporal_test.go
50 lines (44 loc) · 1.36 KB
/
example_main_temporal_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
package gomeos
import "fmt"
func ExampleEverEqTemporalTemporal() {
MeosInitialize("UTC")
tb1 := NewTBoolSeq("{FALSE@2022-10-01, FALSE@2022-10-02,FALSE@2022-10-03}")
tb2 := NewTBoolInst("TRUE@2022-10-01")
res := EverEqTemporalTemporal(tb1, tb2)
fmt.Println(res)
// Output:
// false
}
func ExampleTEqTemporalTemporal() {
MeosInitialize("UTC")
tb1 := NewTBoolSeq("{FALSE@2022-10-01, FALSE@2022-10-02,FALSE@2022-10-03}")
tb2 := NewTBoolInst("TRUE@2022-10-01")
res := TEqTemporalTemporal(tb1, tb2)
fmt.Println(res)
// Output:
// f@2022-10-01 00:00:00+00
}
func ExampleTNEqTemporalTemporal() {
MeosInitialize("UTC")
tb1 := NewTBoolSeq("{FALSE@2022-10-01, FALSE@2022-10-02,FALSE@2022-10-03}")
tb2 := NewTBoolInst("TRUE@2022-10-01")
res := TNEqTemporalTemporal(tb1, tb2)
fmt.Println(res)
// Output:
// t@2022-10-01 00:00:00+00
}
func ExampleTemporalAsWKB() {
tb1 := NewTBoolSeq("{FALSE@2022-10-01, FALSE@2022-10-02,FALSE@2022-10-03}")
wkb, _ := TemporalAsWKB(tb1)
res := TemporalFromWKB(wkb)
fmt.Println(res.String())
// Output:
// {f@2022-10-01 00:00:00+00, f@2022-10-02 00:00:00+00, f@2022-10-03 00:00:00+00}
}
func ExampleTemporalAsHexWKB() {
tb1 := NewTBoolSeq("{FALSE@2022-10-01, FALSE@2022-10-02,FALSE@2022-10-03}")
wkb, _ := TemporalAsHexWKB(tb1)
fmt.Println(wkb)
// Output:
// 011A000603000000030000E06E8FEC8C020000004046AD008D02000000A01DCB148D0200
}