Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HasSingleColumnUniqueIndex
deprecated
added in
v0.22.0
func JSONArrayLength ¶ added in v0.23.0
JSONArrayLength returns JSON_ARRAY_LENGTH SQLite string expression with some normalizations for non-json columns.
It works with both json and non-json column values.
Returns 0 for empty string or NULL column values.
func JSONEach ¶ added in v0.23.0
JSONEach returns JSON_EACH SQLite string expression with some normalizations for non-json columns.
func JSONExtract ¶ added in v0.23.0
JSONExtract returns a JSON_EXTRACT SQLite string expression with some normalizations for non-json columns.
Types ¶
type Index ¶
type Index struct { SchemaName string `json:"schemaName"` IndexName string `json:"indexName"` TableName string `json:"tableName"` Where string `json:"where"` Columns []IndexColumn `json:"columns"` Unique bool `json:"unique"` Optional bool `json:"optional"` }
Index represents a single parsed SQL CREATE INDEX expression.
func FindSingleColumnUniqueIndex ¶ added in v0.25.0
FindSingleColumnUniqueIndex returns the first matching single column unique index.
func ParseIndex ¶
ParseIndex parses the provided "CREATE INDEX" SQL string into Index struct.
type IndexColumn ¶
type IndexColumn struct { Name string `json:"name"` // identifier or expression Collate string `json:"collate"` Sort string `json:"sort"` }
IndexColumn represents a single parsed SQL index column.