batch - ActiveState ActiveGo 1.8
...

Package batch

import "github.com/denisenkom/go-mssqldb/batch"
Overview
Index

Overview ▾

bach splits a single script containing multiple batches separated by a keyword into multiple scripts.

func Split

func Split(sql, separator string) []string

Split the provided SQL into multiple sql scripts based on a given separator, often "GO". It also allows escaping newlines with a backslash.