Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CQLSession ¶ added in v0.1.2
type CQLSession struct {
// contains filtered or unexported fields
}
CQLSession implements a session to cassandra.
func NewCQLSession ¶ added in v0.1.2
func NewCQLSession(ips []string, keyspace string, consistency string, timeout string) (*CQLSession, error)
NewCQLSession returns a populated CQLSession struct, or an error using the underlying cassandra driver.
func (*CQLSession) Close ¶ added in v0.1.2
func (s *CQLSession) Close()
Close closes the underlying cassandra session.
func (*CQLSession) ExecIterQuery ¶ added in v0.1.2
func (s *CQLSession) ExecIterQuery(query string) (ScanIter, CloseIter)
ExecIterQuery performs an iterated query against the underlying session.
func (*CQLSession) ExecQuery ¶ added in v0.1.2
func (s *CQLSession) ExecQuery(query string) error
ExecQuery executes the provided query against the underlying cassandra session.
type CloseIter ¶
type CloseIter func() error
CloseIter is a type returned from ExecIterQuery. When used it wraps the close of the underlying iterator.
type MockCassSession ¶
type MockCassSession struct {
// contains filtered or unexported fields
}
MockCassSession is used in testing.
func (*MockCassSession) Close ¶
func (s *MockCassSession) Close()
Close implements the interface for testing.
func (*MockCassSession) ExecIterQuery ¶
func (s *MockCassSession) ExecIterQuery(query string) (ScanIter, CloseIter)
ExecIterQuery implements the interface for testing.
func (*MockCassSession) ExecQuery ¶
func (s *MockCassSession) ExecQuery(query string) error
ExecQuery implements the interface for testing.
func (*MockCassSession) LastQuery ¶
func (s *MockCassSession) LastQuery() string
LastQuery is used during tests to validate the generated query.