Documentation ¶
Index ¶
- func CreateCassandraTables(sess *gocql.Session, tables ...interface{}) error
- func GetPointer[T any](val T) *T
- func NewCqlOrm[T interface{}](session *gocql.Session) (*cqlOrm[T], error)
- type MockSession
- type MockTable
- func (m *MockTable[T]) AddOtherExpectation(input T, err error)
- func (m *MockTable[T]) AddSelectExpectation(input T, objs []T)
- func (m *MockTable[T]) Delete(obj T) error
- func (m *MockTable[T]) Insert(obj T) error
- func (m *MockTable[T]) Select(obj T) ([]T, error)
- func (m *MockTable[T]) Update(obj T) error
- type NoSqlOrm
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateCassandraTables ¶
Auto create or update table for Cassandra
func GetPointer ¶
func GetPointer[T any](val T) *T
Types ¶
type MockSession ¶
type MockSession struct { Test *testing.T Expectations []interface{} // contains filtered or unexported fields }
func NewMockSession ¶
func NewMockSession(t *testing.T) *MockSession
func (*MockSession) AddIdx ¶
func (m *MockSession) AddIdx()
type MockTable ¶
type MockTable[T interface{}] struct {
// contains filtered or unexported fields
}
func NewMockTable ¶
func NewMockTable[T interface{}](sess *MockSession) *MockTable[T]
func (*MockTable[T]) AddOtherExpectation ¶
func (*MockTable[T]) AddSelectExpectation ¶
func (m *MockTable[T]) AddSelectExpectation(input T, objs []T)
Click to show internal directories.
Click to hide internal directories.