sqlparse
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
README¶
Documentation¶
Index¶
Constants¶
This section is empty.
Variables¶
var LineSeparator = ""LineSeparator can be used to split migrations by an exact line match. This linewill be removed from the output. If left blank, it is not considered. It is defaultedto blank so you will have to set it manually.Use case: in MSSQL, it is convenient to separate commands by GO statements like inSQL Query Analyzer.
Functions¶
This section is empty.
Types¶
typeParsedMigration¶
type ParsedMigration struct {UpStatements []stringDownStatements []stringDisableTransactionUpboolDisableTransactionDownbool}funcParseMigration¶
func ParseMigration(rio.ReadSeeker) (*ParsedMigration,error)
Split the given sql script into individual statements.
The base case is to simply split on semicolons, as thesenaturally terminate a statement.
However, more complex cases like pl/pgsql can have semicolonswithin a statement. For these cases, we provide the explicit annotations'StatementBegin' and 'StatementEnd' to allow the script totell us to ignore semicolons.