Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ColumnFilled ¶ added in v0.7.1
ColumnFilled checks if the column was filled with values before the given position.
func HasNotNullCheck ¶ added in v0.22.0
HasNotNullCheck checks if the given column has a check constraint with a NOT NULL check. In case a CHECK exists, this reduces the risk for data-depend conflicts when changing a nullable column to non-nullable.
Types ¶
type Analyzer ¶
Analyzer checks data-dependent changes.
func (*Analyzer) Diagnostics ¶
Diagnostics runs the common analysis on the file and returns its diagnostics.
type ColumnHandler ¶ added in v0.5.0
type ColumnHandler func(*ColumnPass) ([]sqlcheck.Diagnostic, error)
ColumnHandler allows provide custom diagnostic for specific column rules.
type ColumnPass ¶ added in v0.5.0
type ColumnPass struct { *sqlcheck.Pass Change *sqlcheck.Change // Change context (statement). Table *schema.Table // The table this column belongs to. Column *schema.Column // The diagnosed column. }
ColumnPass wraps the information needed by the handler below to diagnose columns.
type Handler ¶ added in v0.6.4
type Handler struct { // AddNotNull is applied when a new non-nullable column was // added to an existing table. AddNotNull ColumnHandler // ModifyNotNull is an optional handler applied when // a nullable column was changed to non-nullable. ModifyNotNull ColumnHandler }
Handler holds the underlying driver handlers.
Click to show internal directories.
Click to hide internal directories.