Documentation
¶
Index ¶
- func BuildQuery(srcQry string, replacers keyval.KeyVal) (qry string)
- func FileExists(file string) error
- func Has(needle string, haystack ...string) bool
- func MaxInt(ints ...int) int
- func MinInt(ints ...int) int
- func Position(needle string, haystack ...string) int
- func Slash(inStr string) string
- func TableExists(table string, conn *chutils.Connect) error
- func TempFile(ext string, length int) string
- func TempTable(tmpDB string, length int) string
- func ToFile(fileName, text string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildQuery ¶
BuildQuery replaces the placeholders with values placeholders have the form "?key". BuildQuery prepends a "?" to the keys in replacers.
func FileExists ¶
FileExists returns an error if "file" does not exist.
func Position ¶
Position returns the index of needle in the haystack. It returns -1 if needle is not found. If haystack has length 1, then it is split into a slice with delimiter ",".
func TableExists ¶
TableExists returns an error if "table" does not exist. conn is the DB connector.
func TempFile ¶
TempFile produces a random temp file name in the system's tmp location. The file has extension "ext". The file name begins with "tmp" has length 3 + length.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.