queryx: add binding transformer

This commit is contained in:
Nikita Karmatskikh
2021-11-23 21:58:26 +03:00
committed by Michal Jan Matczuk
parent 5e98fb6f71
commit 504f6523d9
4 changed files with 94 additions and 1 deletions

13
transformer.go Normal file
View File

@@ -0,0 +1,13 @@
// Copyright (C) 2017 ScyllaDB
// Use of this source code is governed by a ALv2-style
// license that can be found in the LICENSE file.
package gocqlx
// Transformer transforms the value of the named parameter to another value.
type Transformer func(name string, val interface{}) interface{}
// DefaultBindTransformer just do nothing.
//
// A custom transformer can always be set per Query.
var DefaultBindTransformer Transformer