Documentation ¶
Index ¶
- Constants
- func BuildSQLsInStrings(sqlFormat string, values []string, maxInsertLength int) []string
- func LenStringForSlice(slice []string, sep string) int
- func QuoteWord(s string) string
- func ReadFileCSVToSQLs(sqlFormat, filename string, sep rune, hasHeader, trimSpace bool, colIdx uint) ([]string, []string, error)
- func ReadFileCSVToSQLsSimple(filename, sqlFormat string, hasHeader bool) ([]string, error)
- func SliceToSQL(slice []string) string
- func SliceToSQLs(slice []string, maxInsertLength int) []string
- func SplitTextLines(text string) []string
Constants ¶
View Source
const ( MaxSQLLengthSOQL = 99500 MaxSQLLengthApex = 18000 )
View Source
const SingleQuote = "'"
Variables ¶
This section is empty.
Functions ¶
func BuildSQLsInStrings ¶
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 ReadFileCSVToSQLs ¶
func ReadFileCSVToSQLsSimple ¶
func SliceToSQL ¶
func SliceToSQLs ¶
SliceToSQLs returns a slice of string elements separated by commas without the surrounding parentheses `()`. This is useful for breaking up a long SQL IN clause into multiple SQL statements.
func SplitTextLines ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.