batch

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: Zlib Imports: 6 Imported by: 0

Documentation

Overview

Package batch functions for interacting with batched sql statements in the same file or string.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecuteSQL added in v1.2.0

func ExecuteSQL(ctx context.Context, cp *rdb.ConnPool, batchSQL, separator string) error

ExecuteSQL runs the batchSql on the connection pool on a single connection after separating out each commend, joined with separator.

func SQLErrorWithContext added in v1.2.0

func SQLErrorWithContext(sql string, msg rdb.Errors, contextLines int) error

SQLErrorWithContext highlights errors in the SQL script displaying the number lines of contextLines for each error.

func SplitCmd added in v1.2.0

func SplitCmd(cmd *rdb.Command, separator string) []*rdb.Command

SplitCmd takes a single command and uses separator to split them into mutliple commands.

func SplitSQL added in v1.2.0

func SplitSQL(sql, separator string) []string

SplitSQL takes SQL text and splits it with separator.

Types

This section is empty.

Jump to

Keyboard shortcuts

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