MCPcopy Create free account
hub / github.com/CloudCom/goose / splitSQLStatements

Function splitSQLStatements

lib/goose/migration_sql.go:44–127  ·  view source on GitHub ↗

Split the given sql script into individual statements. The base case is to simply split on semicolons, as these naturally terminate a statement. However, more complex cases like pl/pgsql can have semicolons within a statement. For these cases, we provide the explicit annotations 'StatementBegin' a

(r io.Reader, direction Direction)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 2

runSQLMigrationFunction · 0.85
TestSplitStatementsFunction · 0.85

Calls 2

endsWithSemicolonFunction · 0.85
StringMethod · 0.80

Tested by 1

TestSplitStatementsFunction · 0.68