Documentation
¶
Index ¶
- Variables
- func ChangeTableNameForSpanner(tableName string) string
- func ConvertDynamoTypeToSpannerType(dynamoType string) string
- func CreateConditionExpression(condtionExpression string, expressionAttr map[string]interface{}) (*models.Eval, error)
- func EvaluateExpression(expression *models.Eval) (bool, error)
- func GetFieldNameFromConditionalExpression(conditionalExpression string) string
- func GetStringInBetween(str string, start string, end string) (result string)
- func ParseBeginsWith(rangeExpression string) (string, string, string)
- func ParseListRemoveTarget(target string) (string, int)
- func ParseNestedJSON(value interface{}) interface{}
- func RemoveDuplicatesByteSlice(input [][]byte) [][]byte
- func RemoveDuplicatesFloat(input []float64) []float64
- func RemoveDuplicatesString(input []string) []string
- func RemoveListElement(list []interface{}, idx int) []interface{}
- func TrimSingleQuotes(s string) string
- func UpdateFieldByPath(data map[string]interface{}, path string, newValue interface{}) bool
Constants ¶
This section is empty.
Variables ¶
var CreateConditionExpressionFunc = CreateConditionExpression
Functions ¶
func ChangeTableNameForSpanner ¶
ChangeTableNameForSpanner - ReplaceAll the hyphens (-) with underscore for given table name https://cloud.google.com/spanner/docs/data-definition-language#naming_conventions
func ConvertDynamoTypeToSpannerType ¶
Convert DynamoDB data types to equivalent Spanner types Only used by initialization code to create tables
func CreateConditionExpression ¶
func CreateConditionExpression(condtionExpression string, expressionAttr map[string]interface{}) (*models.Eval, error)
CreateConditionExpression - create evelute condition from condition
func EvaluateExpression ¶
EvaluateExpression - evalute expression
func GetFieldNameFromConditionalExpression ¶
GetFieldNameFromConditionalExpression returns the field name from conditional expression
func GetStringInBetween ¶
GetStringInBetween Returns empty string if no start string found
func ParseBeginsWith ¶
ParseBeginsWith ..
func ParseListRemoveTarget ¶
parseListRemoveTarget parses a list attribute target and its index from the action value. It returns the attribute name and index. Example: listAttr[2]
func ParseNestedJSON ¶
func ParseNestedJSON(value interface{}) interface{}
func RemoveDuplicatesByteSlice ¶
RemoveDuplicatesByteSlice removes duplicates from a [][]byte
func RemoveDuplicatesFloat ¶
RemoveDuplicatesFloat removes duplicates from a []float64
func RemoveDuplicatesString ¶
RemoveDuplicatesString removes duplicates from a []string
func RemoveListElement ¶
func RemoveListElement(list []interface{}, idx int) []interface{}
removeListElement removes an element from a list at the specified index. If the index is invalid, it returns the original list.
func TrimSingleQuotes ¶
func UpdateFieldByPath ¶
UpdateFieldByPath navigates the nested JSON structure to update the desired field.
Types ¶
This section is empty.