db
db copied to clipboard
db.And is not a type
I'm using upper.io/db.v3, my code example:
cond := db.And{
db.Cond{"col1": "col1"},
db.Or{
db.Cond{"col2": "x1"},
db.Cond{"col2": "x2"},
},
}
err = sess.Collection("mytable").Find(cond).All(&tbs)
it tell me "db.And is not a type"
I tried to another method:
cond := db.And{
db.Cond{"col1": "col1"},
db.Or{
db.Cond{"col2": "x1"},
db.Cond{"col2": "x2"},
},
}
sess.SelectFrom("tables").Where(cond)
it's same error.
please tell me how do I ?
db.And()
sorry my mistake... lol...