Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var NewCluster = func(config *gocql.ClusterConfig) IClusterConfig {
return config
}
View Source
var NewSession = func(opt config.Cassandra) (ISession, error) { cluster := gocql.NewCluster(opt.CassandraHosts...) if err := extendOptions(cluster, opt); err != nil { return nil, err } return NewCluster(cluster).CreateSession() }
NewSession method
Functions ¶
This section is empty.
Types ¶
type IClusterConfig ¶
IClusterConfig interface
type ISession ¶
type ISession interface { SetConsistency(cons gocql.Consistency) SetPageSize(n int) SetPrefetch(p float64) SetTrace(trace gocql.Tracer) Query(stmt string, values ...interface{}) *gocql.Query Bind(stmt string, b func(q *gocql.QueryInfo) ([]interface{}, error)) *gocql.Query Close() Closed() bool KeyspaceMetadata(string) (*gocql.KeyspaceMetadata, error) ExecuteBatch(batch *gocql.Batch) error ExecuteBatchCAS(batch *gocql.Batch, dest ...interface{}) (applied bool, iter *gocql.Iter, err error) MapExecuteBatchCAS(batch *gocql.Batch, dest map[string]interface{}) (applied bool, iter *gocql.Iter, err error) NewBatch(typ gocql.BatchType) *gocql.Batch }
ISession interface
Click to show internal directories.
Click to hide internal directories.