Skip to content

Commit bd1dcb5

Browse files
committed
params test
1 parent 20277c1 commit bd1dcb5

File tree

1 file changed

+7
-31
lines changed

1 file changed

+7
-31
lines changed

sugar/params_test.go

Lines changed: 7 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
//go:build !go1.18
2-
// +build !go1.18
3-
41
package sugar
52

63
import (
@@ -60,29 +57,17 @@ func TestGenerateDeclareSection(t *testing.T) {
6057
},
6158
{
6259
params: table.NewQueryParameters(
63-
table.ValueParam(
64-
"$ts",
65-
types.TimestampValueFromTime(time.Now()),
66-
),
60+
table.ValueParam("$ts", types.TimestampValueFromTime(time.Now())),
6761
),
6862
declare: `
6963
DECLARE $ts AS Timestamp;
7064
`,
7165
},
7266
{
7367
params: table.NewQueryParameters(
74-
table.ValueParam(
75-
"$a",
76-
types.BoolValue(true),
77-
),
78-
table.ValueParam(
79-
"$b",
80-
types.Int64Value(123),
81-
),
82-
table.ValueParam(
83-
"$c",
84-
types.OptionalValue(types.UTF8Value("test")),
85-
),
68+
table.ValueParam("$a", types.BoolValue(true)),
69+
table.ValueParam("$b", types.Int64Value(123)),
70+
table.ValueParam("$c", types.OptionalValue(types.UTF8Value("test"))),
8671
),
8772
declare: `
8873
DECLARE $a AS Bool;
@@ -92,18 +77,9 @@ func TestGenerateDeclareSection(t *testing.T) {
9277
},
9378
{
9479
params: table.NewQueryParameters(
95-
table.ValueParam(
96-
"$a",
97-
types.BoolValue(true),
98-
),
99-
table.ValueParam(
100-
"b",
101-
types.Int64Value(123),
102-
),
103-
table.ValueParam(
104-
"c",
105-
types.OptionalValue(types.UTF8Value("test")),
106-
),
80+
table.ValueParam("$a", types.BoolValue(true)),
81+
table.ValueParam("b", types.Int64Value(123)),
82+
table.ValueParam("c", types.OptionalValue(types.UTF8Value("test"))),
10783
),
10884
declare: `
10985
DECLARE $a AS Bool;

0 commit comments

Comments
 (0)