Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HasSingleColumnUniqueIndex ¶
HasColumnUniqueIndex loosely checks whether the specified column has a single column unique index (WHERE statements are ignored).
func JsonArrayLength ¶
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 ¶
JsonEach returns JSON_EACH SQLite string expression with some normalizations for non-json columns.
func JsonExtract ¶
JsonExtract returns a JSON_EXTRACT SQLite string expression with some normalizations for non-json columns.
Types ¶
type Index ¶
type Index struct { Unique bool `json:"unique"` Optional bool `json:"optional"` SchemaName string `json:"schemaName"` IndexName string `json:"indexName"` TableName string `json:"tableName"` Columns []IndexColumn `json:"columns"` Where string `json:"where"` }
Index represents a single parsed SQL CREATE INDEX expression.
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.