sql

package
v0.35.5 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxSQLLengthSOQL = 99500
	MaxSQLLengthApex = 18000
)
View Source
const SingleQuote = "'"

Variables

This section is empty.

Functions

func BuildSQLsInStrings

func BuildSQLsInStrings(sqlFormat string, values []string, maxInsertLength int) []string

BuildSQLsInStrings returns a SQL statement inserting SQL IN values. The supplied SQL fromat should have an IN clause like `IN (%s)`. For example `SELECT Id from Account WHERE Id IN (%s)`.

func LenStringForSlice

func LenStringForSlice(slice []string, sep string) int

func QuoteWord

func QuoteWord(s string) string

func ReadFileCSVToSQLs

func ReadFileCSVToSQLs(sqlFormat, filename string, sep rune, hasHeader, trimSpace bool, colIdx uint) ([]string, []string, error)

func ReadFileCSVToSQLsSimple

func ReadFileCSVToSQLsSimple(filename, sqlFormat string, hasHeader bool) ([]string, error)

func SliceToSQL

func SliceToSQL(slice []string) string

func SliceToSQLs

func SliceToSQLs(slice []string, maxInsertLength int) []string

SliceToSQLs returns a slice of string elements separated by commas without the surrounding parentheses `()`.

func SplitTextLines

func SplitTextLines(text string) []string

Types

This section is empty.

Jump to

Keyboard shortcuts

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