Remove deprecated top level functions Get and Select
Signed-off-by: Michał Matczuk <michal@scylladb.com>
This commit is contained in:
committed by
Michal Jan Matczuk
parent
7c0a35d621
commit
710f921b79
@@ -125,7 +125,7 @@ func TestStruct(t *testing.T) {
|
||||
|
||||
t.Run("get", func(t *testing.T) {
|
||||
var v StructTable
|
||||
if err := gocqlx.Get(&v, session.Query(`SELECT * FROM struct_table`)); err != nil {
|
||||
if err := gocqlx.Query(session.Query(`SELECT * FROM struct_table`), nil).Get(&v); err != nil {
|
||||
t.Fatal("get failed", err)
|
||||
}
|
||||
|
||||
@@ -136,7 +136,7 @@ func TestStruct(t *testing.T) {
|
||||
|
||||
t.Run("select", func(t *testing.T) {
|
||||
var v []StructTable
|
||||
if err := gocqlx.Select(&v, session.Query(`SELECT * FROM struct_table`)); err != nil {
|
||||
if err := gocqlx.Query(session.Query(`SELECT * FROM struct_table`), nil).Select(&v); err != nil {
|
||||
t.Fatal("select failed", err)
|
||||
}
|
||||
|
||||
@@ -151,7 +151,7 @@ func TestStruct(t *testing.T) {
|
||||
|
||||
t.Run("select ptr", func(t *testing.T) {
|
||||
var v []*StructTable
|
||||
if err := gocqlx.Select(&v, session.Query(`SELECT * FROM struct_table`)); err != nil {
|
||||
if err := gocqlx.Query(session.Query(`SELECT * FROM struct_table`), nil).Select(&v); err != nil {
|
||||
t.Fatal("select failed", err)
|
||||
}
|
||||
|
||||
@@ -179,7 +179,7 @@ func TestScannable(t *testing.T) {
|
||||
|
||||
t.Run("get", func(t *testing.T) {
|
||||
var v FullName
|
||||
if err := gocqlx.Get(&v, session.Query(`SELECT testfullname FROM scannable_table`)); err != nil {
|
||||
if err := gocqlx.Query(session.Query(`SELECT testfullname FROM scannable_table`), nil).Get(&v); err != nil {
|
||||
t.Fatal("get failed", err)
|
||||
}
|
||||
|
||||
@@ -190,8 +190,8 @@ func TestScannable(t *testing.T) {
|
||||
|
||||
t.Run("select", func(t *testing.T) {
|
||||
var v []FullName
|
||||
if err := gocqlx.Select(&v, session.Query(`SELECT testfullname FROM scannable_table`)); err != nil {
|
||||
t.Fatal("get failed", err)
|
||||
if err := gocqlx.Query(session.Query(`SELECT testfullname FROM scannable_table`), nil).Select(&v); err != nil {
|
||||
t.Fatal("select failed", err)
|
||||
}
|
||||
|
||||
if len(v) != 1 {
|
||||
@@ -205,8 +205,8 @@ func TestScannable(t *testing.T) {
|
||||
|
||||
t.Run("select ptr", func(t *testing.T) {
|
||||
var v []*FullName
|
||||
if err := gocqlx.Select(&v, session.Query(`SELECT testfullname FROM scannable_table`)); err != nil {
|
||||
t.Fatal("get failed", err)
|
||||
if err := gocqlx.Query(session.Query(`SELECT testfullname FROM scannable_table`), nil).Select(&v); err != nil {
|
||||
t.Fatal("select failed", err)
|
||||
}
|
||||
|
||||
if len(v) != 1 {
|
||||
|
||||
Reference in New Issue
Block a user