Documentation
¶
Index ¶
- Variables
- func ConvertCSVToFloat32List(input string) []float32
- func ConvertCSVToFloat64List(input string) []float64
- func ConvertCSVToInt64List(input string) []int64
- func ConvertCSVToIntList(input string) []int64
- func ConvertCSVToList(input string) []string
- func ConvertExpectedResult(input []map[string]interface{}) []map[string]interface{}
- func ConvertParams(t *testing.T, params []map[string]interface{}, fileName, query string) []interface{}
- func ConvertToMap(t *testing.T, param map[string]any, fileName, query string) map[string]interface{}
- func ConvertValue(t *testing.T, param map[string]any, fileName, query string) any
- func LogError(t *testing.T, filename, opDesc, query string, err error)
- func LogFailure(t *testing.T, filename, opDesc, query, diff string)
- func LogFatal(msg string)
- func LogInfo(msg string)
- func LogSectionDivider()
- func LogSuccess(t *testing.T, opDesc, queryType string)
- func LogTestError(msg string)
- func LogTestFatal(t *testing.T, msg string)
- func LogWarning(t *testing.T, msg string)
- func SetupLogger(logFileName string, enableFileLogging bool) (*os.File, error)
- type ConversionError
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func ConvertCSVToFloat32List ¶
ConvertCSVToFloat32List takes a comma-separated string of numbers and returns a slice of float32, handling conversion errors by skipping invalid values
func ConvertCSVToFloat64List ¶
ConvertCSVToFloat64List takes a comma-separated string of numbers and returns a slice of float64, handling conversion errors by skipping invalid values
func ConvertCSVToInt64List ¶
ConvertCSVToInt64List takes a comma-separated string of numbers and returns a slice of int64, handling conversion errors by skipping invalid values
func ConvertCSVToIntList ¶
func ConvertCSVToList ¶
ConvertCSVToList takes a comma-separated string and returns a slice of strings
func ConvertExpectedResult ¶
ConvertExpectedResult processes the expected results from test cases by converting values into appropriate Go types based on the specified 'datatype'. It handles primitive types (text, int, bigint, float, double, boolean, timestamp), map types (map<text, int>, map<timestamp, text>, etc.), and set types (set<int>, set<text>, etc.). This function ensures that the expected result format matches the structure of the actual database query results for accurate comparison during testing.
func ConvertParams ¶
func ConvertParams(t *testing.T, params []map[string]interface{}, fileName, query string) []interface{}
convertParams converts parameters to the correct Go types based on their expected Cassandra data types
func ConvertToMap ¶
func ConvertToMap(t *testing.T, param map[string]any, fileName, query string) map[string]interface{}
ConvertToMap converts a map[string]interface{} to map[string]interface{} with converted values
func ConvertValue ¶
ConvertValue converts a value to the corresponding Go type based on the Cassandra datatype
func LogFailure ¶
LogFailure logs a query execution failure with expected vs actual differences.
func LogFatal ¶
func LogFatal(msg string)
LogFatal logs a critical error message and exits the application.
func LogSectionDivider ¶
func LogSectionDivider()
LogSectionDivider logs a section divider for test case separation.
func LogSuccess ¶
LogSuccess logs a successful query execution with optional test integration.
func LogTestError ¶
func LogTestError(msg string)
LogWarning logs warnings or unexpected but non-fatal conditions.
func LogTestFatal ¶
LogWarning logs warnings or unexpected but non-fatal conditions.
func LogWarning ¶
LogWarning logs warnings or unexpected but non-fatal conditions.
Types ¶
type ConversionError ¶
ConversionError represents an error that occurs during type conversion
func (*ConversionError) Error ¶
func (e *ConversionError) Error() string