Merge pull request #3 from hailocab/upstream-merge
Upstream merge Add Session wrapper With this patch we can now use gocqlx like: ``` session.Query(`SELECT * FROM struct_table`, nil).Get(&v) ``` instead of (old format): ``` gocqlx.Query(session.Query(`SELECT * FROM struct_table`), nil).Get(&v) ``` Signed-off-by: Michał Matczuk <michal@scylladb.com>
This commit is contained in:
committed by
Michal Jan Matczuk
parent
ab279e68ed
commit
95d96fa939
@@ -7,7 +7,7 @@ package migrate
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gocql/gocql"
|
||||
"github.com/scylladb/gocqlx"
|
||||
)
|
||||
|
||||
// CallbackEvent specifies type of the event when calling CallbackFunc.
|
||||
@@ -21,7 +21,7 @@ const (
|
||||
|
||||
// CallbackFunc enables interrupting the migration process and executing code
|
||||
// while migrating. If error is returned the migration is aborted.
|
||||
type CallbackFunc func(ctx context.Context, session *gocql.Session, ev CallbackEvent, name string) error
|
||||
type CallbackFunc func(ctx context.Context, session gocqlx.Session, ev CallbackEvent, name string) error
|
||||
|
||||
// Callback is called before and after each migration.
|
||||
// See CallbackFunc for details.
|
||||
|
||||
Reference in New Issue
Block a user