Movatterモバイル変換


[0]ホーム

URL:


sqlparse

package
v1.8.0Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 17, 2025 License:MIT, MITImports:5Imported by:42

Details

Repository

github.com/rubenv/sql-migrate

Links

README

SQL migration parser

Based on thegoose migration parser.

License

This library is distributed under theMIT license.

Documentation

Index

Constants

This section is empty.

Variables

View Source
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.

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp