github.com/voedger/voedger@v0.0.0-20240520144910-273e84102129/pkg/istorage/cas/types.go (about)

     1  /*
     2   * Copyright (c) 2021-present unTill Pro, Ltd.
     3   */
     4  
     5  package cas
     6  
     7  type CassandraParamsType struct {
     8  	// Comma separated list of hosts
     9  	Hosts        string
    10  	Port         int
    11  	Username     string
    12  	Pwd          string
    13  	ProtoVersion int
    14  	CQLVersion   string
    15  	NumRetries   int
    16  	DC           string
    17  
    18  	// e.g. "{ 'class' : 'SimpleStrategy', 'replication_factor' : 1 }"
    19  	KeyspaceWithReplication string
    20  }
    21  
    22  func (p CassandraParamsType) cqlVersion() string {
    23  	if p.CQLVersion == "" {
    24  		return "3.0.0"
    25  	}
    26  	return p.CQLVersion
    27  }