Updated examples and README for 2.0

Signed-off-by: Michał Matczuk <michal@scylladb.com>
This commit is contained in:
Michał Matczuk
2020-04-20 18:00:01 +02:00
committed by Michal Jan Matczuk
parent 227d152ac2
commit 0675f72f4f
9 changed files with 799 additions and 403 deletions

View File

@@ -15,6 +15,13 @@ import (
"github.com/scylladb/go-reflectx"
)
// CompileNamedQueryString translates query with named parameters in a form
// ':<identifier>' to query with '?' placeholders and a list of parameter names.
// If you need to use ':' in a query, i.e. with maps or UDTs use '::' instead.
func CompileNamedQueryString(qs string) (stmt string, names []string, err error) {
return CompileNamedQuery([]byte(qs))
}
// CompileNamedQuery translates query with named parameters in a form
// ':<identifier>' to query with '?' placeholders and a list of parameter names.
// If you need to use ':' in a query, i.e. with maps or UDTs use '::' instead.