package
2.5.0+incompatible
Repository: https://github.com/vattle/sqlboiler.git
Documentation: pkg.go.dev
# Functions
CamelCase takes a variable name in the format of "var_name" and converts it into a go styled variable name of "varName".
ContainsAny returns true if any of the passed in strings are found in the passed in string slice.
GenerateIgnoreTags converts a slice of tag strings into ignore tags that can be passed onto the end of a struct, for example: tags: ["xml", "db"] convert to: xml:"-" db:"-".
GenerateTags converts a slice of tag strings into tags that can be passed onto the end of a struct, for example: tags: ["xml", "db"] convert to: xml:"column_name" db:"column_name".
GetBuffer retrieves a buffer from the buffer pool.
Identifier is a base conversion from Base 10 integers to Base 26 integers that are represented by an alphabet from a-z See tests for example outputs.
IdentQuote attempts to quote simple identifiers in SQL statements.
IdentQuoteSlice applies IdentQuote to a slice.
InsertColumnSet generates the set of columns to insert and return for an insert statement the return columns are used to get values that are assigned within the database during the insert to keep the struct in sync with what's in the db.
IsEnumNormal checks a set of eval values to see if they're "normal".
JoinSlices merges two string slices of equal length.
MakeStringMap converts a map[string]string into the format: "key": "value", "key": "value".
ParseEnumName returns the name portion of an enum if it exists
Postgres and MySQL drivers return different values psql: enum.enum_name('values'...) mysql: enum('values'...) In the case of mysql, the name will never return anything.
ParseEnumVals returns the values from an enum string
Postgres and MySQL drivers return different values psql: enum.enum_name('values'...) mysql: enum('values'...).
Placeholders generates the SQL statement placeholders for in queries.
Plural converts singular words to plural words (eg: person to people).
PrefixStringSlice with the given str.
PutBuffer back into the buffer pool.
QuoteCharacter returns a string that allows the quote character to be embedded into a Go string that uses double quotes:.
ReplaceReservedWords takes a word and replaces it with word_ if it's found in the list of reserved words.
SchemaTable returns a table name with a schema prefixed if using a database that supports real schemas, for example, for Postgres: "schema_name"."table_name", for MS SQL: [schema_name].[table_name], versus simply "table_name" for MySQL (because it does not support real schemas).
SetComplement subtracts the elements in b from a.
SetInclude checks to see if the string is found in the string slice.
SetMerge will return a merged slice without duplicates.
SetParamNames takes a slice of columns and returns a comma separated list of parameter names for a template statement SET clause.
ShouldTitleCaseEnum checks a value to see if it's title-case-able.
Singular converts plural words to singular words (eg: people to person).
SortByKeys returns a new ordered slice based on the keys ordering.
StringMap maps a function over a slice of strings.
StringSliceMatch returns true if the length of both slices is the same, and the elements of both slices are the same.
TitleCase changes a snake-case variable name into a go styled object variable name of "ColumnName".
TitleCaseIdentifier splits on dots and then titlecases each fragment.
UpdateColumnSet generates the set of columns to update for an update statement.
WhereClause returns the where clause using start as the $ flag index For example, if start was 2 output would be: "colthing=$2 AND colstuff=$3".
WhereClauseRepeated returns the where clause repeated with OR clause using start as the $ flag index For example, if start was 2 output would be: "(colthing=$2 AND colstuff=$3) OR (colthing=$4 AND colstuff=$5)".