package
0.28.1
Repository: https://github.com/ariga/atlas.git
Documentation: pkg.go.dev

# Functions

ApplyChanges is a helper used by the different drivers to apply changes.
AttrOr returns the first attribute of the given type, or the given default value.
BodyDefChanged reports if the body definition of a function, procedure, view, or trigger has changed.
Charset reports if the attribute contains the "charset" attribute, and it needs to be defined explicitly on the schema.
CheckChangesScope checks that changes can be applied on a schema scope (connection).
CheckDiff computes the change diff between the 2 tables.
Collate reports if the attribute contains the "collation"/"collate" attribute, and it needs to be defined explicitly on the schema.
CommentChange reports if the element comment was changed.
CommentDiff computes the comment diff between the 2 attribute list.
DefaultValue returns the string represents the DEFAULT of a column.
DetachCycles takes a list of schema changes, and detaches references between changes if there is at least one circular reference in the changeset.
ExprLastIndex scans the first expression in the given string until its end and returns its last index.
Has finds the first element in the elements list that matches target, and if so, sets target to that attribute value and returns true.
IsLiteralBool reports if the given string is a valid literal bool.
IsLiteralNumber reports if the given string is a literal number.
IsQuoted reports if the given string is quoted with one of the given quotes (e.g.
IsUint reports whether the string represents an unsigned integer.
LinkSchemaTables links foreign-key stub tables/columns to actual elements.
MayWrap ensures the given string is wrapped with parentheses.
ModeInspectRealm returns the InspectMode or its default.
ModeInspectSchema returns the InspectMode or its default.
P returns a pointer to v.
ReverseChanges reverses the order of the changes.
SameSchema reports if the given schemas are the same.
SameTable reports if the two objects represent the same table.
SameView reports if the two objects represent the same view.
ScanNullBool scans one sql.NullBool record and closes the rows at the end.
ScanOne scans one record and closes the rows at the end.
ScanStrings scans sql.Rows into a slice of strings and closes it at the end.
SchemaFKs scans the rows and adds the foreign-key to the schema table.
SetReversible sets the Reversible field to true if all planned changes are reversible.
SingleConn returns a closable single connection from the given ExecQuerier.
SingleQuote quotes the given string with single quote.
SortChanges is a helper function to sort to level changes based on their priority.
TrimViewExtra trims the extra unnecessary characters from the view definition.
TypedSchemaFKs is a version of SchemaFKs that allows to specify the type of used to scan update and delete actions from the database.
Unquote single or double quotes.
V returns the value p is pointing to.
ValidString reports if the given string is not null and valid.
ValuesEqual checks if the 2 string slices are equal (including their order).

# Variables

NoChange can be returned by DiffDriver methods to indicate that no change is needed.
NoRows to be used by differs and planners without a connection.

# Structs

No description provided by the author
A Builder provides a syntactic sugar API for writing SQL statements.
DevDriver is a driver that provides additional functionality to interact with the development database.
No description provided by the author
FKAttrScanner allows extending foreign-keys scanning with extra attributes.
SortOptions allows drivers to customize the behavior of the SortChanges function.
UnsupportedTypeError describes an unsupported type error.

# Interfaces

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author