sql

package
v1.50.7 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Overview

Code adapted from https://github.com/jackc/tern/blob/master/migrate/internal/sqlsplit/sqlsplit.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SQLSplit added in v1.50.5

func SQLSplit(sql string) []string

Split splits sql into into a slice of strings each containing one SQL statement.

Types

type LocalSqlServer

type LocalSqlServer struct {
	sqlpb.UnimplementedSqlServer
	// contains filtered or unexported fields
}

func NewLocalSqlServer

func NewLocalSqlServer(projectName string) (*LocalSqlServer, error)

func (*LocalSqlServer) ConnectionString

func (*LocalSqlServer) Query added in v1.49.0

func (l *LocalSqlServer) Query(ctx context.Context, connectionString string, query string) ([]*orderedmap.OrderedMap[string, any], error)

create a function that will execute a query on the local database

func (*LocalSqlServer) Stop

func (l *LocalSqlServer) Stop() error

Jump to

Keyboard shortcuts

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