Skip to content

Commit e943e60

Browse files
committed
Merge Add method to Query to be able to retrieve the Values (#1700)
2 parents a2566b8 + c0ca2fa commit e943e60

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

session.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -935,6 +935,12 @@ func (q Query) Statement() string {
935935
return q.stmt
936936
}
937937

938+
// Values returns the values passed in via Bind. This can be helpful for wrapping types
939+
// to not have to keep track of the values to be able to access them.
940+
func (q Query) Values() []interface{} {
941+
return q.values
942+
}
943+
938944
// String implements the stringer interface.
939945
func (q Query) String() string {
940946
return fmt.Sprintf("[query statement=%q values=%+v consistency=%s]", q.stmt, q.values, q.cons)

0 commit comments

Comments
 (0)