未定义FieldA.Eq(类型cqlc.BooleanColumn没有字段或方法Eq)

时间:2018-07-12 20:57:24

标签: go cassandra

我正在使用cqlc查询cassandra。当我尝试运行SELECT语句

    ctx := cqlc.NewContext()
    iter, err := ctx.Select().
                 From(X).
                 Where(
                   X.A.Eq(true),
                   X.B.Eq(cityID)).
                 Fetch(c.session)

它会引发以下错误

X.A.Eq undefined (type cqlc.BooleanColumn has no field or method Eq)

X.A是一个布尔列

1 个答案:

答案 0 :(得分:0)

  

type BooleanColumn

type BooleanColumn interface {
    Column
    To(value *bool) ColumnBinding
}

  

type EqualityBooleanColumn

type EqualityBooleanColumn interface {
    BooleanColumn
    Eq(value bool) Condition
}

  

X.A.Eq undefined (type cqlc.BooleanColumn has no field or method Eq)

是的。