utils

package
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArrayToUpper added in v0.0.1

func ArrayToUpper(arr []string) []string

func ArraysBothDiff added in v0.0.1

func ArraysBothDiff[A comparable](arr1, arr2 []A) (isEqual bool, onlyInArr1 []A, onlyInArr2 []A)

func ArraysEqual

func ArraysEqual[A comparable](arr1, arr2 []A) bool

func ConvertBackslashEscapesToHanaEscapes added in v0.0.1

func ConvertBackslashEscapesToHanaEscapes(input string) string

ConvertBackslashEscapesToHanaEscapes fixes quote escaping for HANA SQL compatibility. Converts \"identifier\" to "identifier" and handles double-wrapped quotes like ""STRING"".

func EscapeDoubleQuotes added in v0.0.1

func EscapeDoubleQuotes(input string) string

func EscapeSingleQuotes added in v0.0.1

func EscapeSingleQuotes(input string) string

func MapDiff

func MapDiff[K, V comparable](map1, map2 map[K]V) map[K]V

func MapDiffOnlyDesired added in v0.1.2

func MapDiffOnlyDesired[K, V comparable](observed, desired map[K]V) map[K]V

MapDiffOnlyDesired compares only the keys that exist in the desired map. This prevents comparing default values from observed state that weren't specified by the user. Returns a map of parameters that need to be updated (keys from desired that differ in observed).

func MapsBothDiff added in v0.0.1

func MapsBothDiff[K, V comparable](map1, map2 map[K]V) (isEqual bool, onlyInMap1 map[K]V, onlyInMap2 map[K]V)

func PreprocessPrivilegeStrings added in v0.0.1

func PreprocessPrivilegeStrings(privilegeStrings []string) []string

PreprocessPrivilegeStrings cleans up privilege strings from external sources.

func TrimOuterDoubleQuotes added in v0.0.1

func TrimOuterDoubleQuotes(input string) string

TrimOuterDoubleQuotes removes outer double quotes if the string is properly quoted. Handles escaped quotes and won't break malformed strings. "INSERT ON SCHEMA NEW_SCHEMA" becomes INSERT ON SCHEMA NEW_SCHEMA

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL