multistmt

package
v4.99.2-snapshot Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package multistmt provides methods for parsing multi-statement database migrations

Index

Constants

This section is empty.

Variables

View Source
var StartBufSize = 4096

StartBufSize is the default starting size of the buffer used to scan and parse multi-statement migrations

Functions

func Parse

func Parse(reader io.Reader, delimiter []byte, maxMigrationSize int, h Handler) error

Parse parses the given multi-statement migration

Types

type Handler

type Handler func(migration []byte) bool

Handler handles a single migration parsed from a multi-statement migration. It's given the single migration to handle and returns whether or not further statements from the multi-statement migration should be parsed and handled.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL