batch

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2022 License: Zlib Imports: 5 Imported by: 0

Documentation

Overview

Proides 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 BatchSplitCmd

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

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

func BatchSplitSql

func BatchSplitSql(sql, separator string) []string

BatchSplitSql takes SQL text and splits it with separator.

func ExecuteBatchSql

func ExecuteBatchSql(cp *rdb.ConnPool, batchSql, separator string) error

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

func SqlErrorWithContext

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.

Types

This section is empty.

Jump to

Keyboard shortcuts

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