Documentation ¶
Index ¶
- type Iter
- type IterInterface
- type Query
- func (q *Query) Bind(v ...interface{}) QueryInterface
- func (q *Query) Consistency(c gocql.Consistency) QueryInterface
- func (q *Query) Exec() error
- func (q *Query) Iter() IterInterface
- func (q *Query) MapScan(m map[string]interface{}) error
- func (q *Query) PageSize(n int) QueryInterface
- func (q *Query) PageState(state []byte) QueryInterface
- func (q *Query) RetryPolicy(policy gocql.RetryPolicy) QueryInterface
- func (q *Query) Scan(dest ...interface{}) error
- type QueryInterface
- type Session
- type SessionInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Iter ¶
type Iter struct {
// contains filtered or unexported fields
}
Iter is a wrapper for an iter for mockability.
type IterInterface ¶
type IterInterface interface { Close() error Scan(...interface{}) bool MapScan(m map[string]interface{}) bool PageState() []byte }
IterInterface allows gomock mock of gocql.Iter
type Query ¶
type Query struct {
// contains filtered or unexported fields
}
Query is a wrapper for a query for mockability.
func (*Query) Bind ¶
func (q *Query) Bind(v ...interface{}) QueryInterface
Bind wraps the query's Bind method
func (*Query) Consistency ¶
func (q *Query) Consistency(c gocql.Consistency) QueryInterface
Consistency wraps the query's Consistency method
func (*Query) PageSize ¶
func (q *Query) PageSize(n int) QueryInterface
PageSize wraps the query's PageSize method
func (*Query) PageState ¶
func (q *Query) PageState(state []byte) QueryInterface
PageState wraps the query's PageState method
func (*Query) RetryPolicy ¶
func (q *Query) RetryPolicy(policy gocql.RetryPolicy) QueryInterface
RetryPolicy wraps the query's RetryPolicy method
type QueryInterface ¶
type QueryInterface interface { Bind(...interface{}) QueryInterface Exec() error Iter() IterInterface Scan(...interface{}) error MapScan(m map[string]interface{}) error Consistency(c gocql.Consistency) QueryInterface PageState(state []byte) QueryInterface PageSize(n int) QueryInterface RetryPolicy(policy gocql.RetryPolicy) QueryInterface }
QueryInterface allows gomock mock of gocql.Query
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session is a wrapper for a session for mockability.
func (*Session) ExecuteBatch ¶
ExecuteBatch wraps the session's ExecuteBatch method
func (*Session) Query ¶
func (s *Session) Query(stmt string, values ...interface{}) QueryInterface
Query wraps the session's Query method
type SessionInterface ¶
type SessionInterface interface { Query(string, ...interface{}) QueryInterface ExecuteBatch(batch *gocql.Batch) error Close() }
SessionInterface allows gomock mock of gocql.Session
func NewSession ¶
func NewSession(session *gocql.Session) SessionInterface
NewSession instantiates a new Session