Documentation ¶
Index ¶
- func ConfigureCassandraCluster(cfg config.Cassandra, cluster *gocql.ClusterConfig) error
- func ConvertError(operation string, err error) error
- func IsNotFoundError(err error) bool
- func NewCassandraCluster(cfg config.Cassandra, resolver resolver.ServiceResolver) (*gocql.ClusterConfig, error)
- func NewSession(newClusterConfigFunc func() (*gocql.ClusterConfig, error), logger log.Logger, ...) (*session, error)
- func UUIDToString(item interface{}) string
- func UUIDsToStringSlice(item interface{}) []string
- type Batch
- type BatchType
- type Consistency
- type Iter
- type Query
- type SerialConsistency
- type Session
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigureCassandraCluster ¶ added in v1.20.1
func ConfigureCassandraCluster(cfg config.Cassandra, cluster *gocql.ClusterConfig) error
Modifies the input cluster config in place.
func ConvertError ¶
func IsNotFoundError ¶
func NewCassandraCluster ¶
func NewCassandraCluster( cfg config.Cassandra, resolver resolver.ServiceResolver, ) (*gocql.ClusterConfig, error)
func NewSession ¶
func UUIDToString ¶
func UUIDToString( item interface{}, ) string
func UUIDsToStringSlice ¶ added in v1.14.0
func UUIDsToStringSlice( item interface{}, ) []string
Types ¶
type Batch ¶
type Batch struct {
// contains filtered or unexported fields
}
func (*Batch) WithTimestamp ¶
type Consistency ¶
type Consistency uint16
Consistency is the consistency level used by a Query
const ( Any Consistency = iota One Two Three Quorum All LocalQuorum EachQuorum LocalOne )
Definition of all Consistency levels
type Iter ¶
type Iter interface { Scan(...interface{}) bool MapScan(map[string]interface{}) bool PageState() []byte Close() error }
Iter is the interface for executing and iterating over all resulting rows.
type Query ¶
type Query interface { Exec() error Scan(...interface{}) error ScanCAS(...interface{}) (bool, error) MapScan(map[string]interface{}) error MapScanCAS(map[string]interface{}) (bool, error) Iter() Iter PageSize(int) Query PageState([]byte) Query WithContext(context.Context) Query WithTimestamp(int64) Query Consistency(Consistency) Query Bind(...interface{}) Query }
Query is the interface for query object.
type SerialConsistency ¶
type SerialConsistency uint16
SerialConsistency is the serial consistency level used by a Query
const ( Serial SerialConsistency = iota LocalSerial )
Definition of all SerialConsistency levels
type Session ¶
type Session interface { Query(string, ...interface{}) Query NewBatch(BatchType) *Batch ExecuteBatch(*Batch) error MapExecuteBatchCAS(*Batch, map[string]interface{}) (bool, Iter, error) AwaitSchemaAgreement(ctx context.Context) error Close() }
Session is the interface for interacting with the database.
Click to show internal directories.
Click to hide internal directories.