Skip to content

Commit 3e0e200

Browse files
committed
ci: add test for variable.
1 parent 2892b78 commit 3e0e200

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/session_test.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,15 @@ func (s *DatabendTestSuite) TestSessionConfig() {
8383
r.Nil(err)
8484
r.Equal(int64(0), result)
8585
}
86+
87+
func (s *DatabendTestSuite) TestSessionVariable() {
88+
r := require.New(s.T())
89+
90+
var result int64
91+
92+
_, err := s.db.Exec("set variable a = 100")
93+
r.Nil(err)
94+
err = s.db.QueryRow("select $a").Scan(&result)
95+
r.Nil(err)
96+
r.Equal(int64(100), result)
97+
}

0 commit comments

Comments
 (0)