tblcmds

package
v0.40.4 Latest Latest
Warning

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

Go to latest
Published: May 19, 2022 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Overview

Package tblcmds contains table subcommand command functions for making changes to tables.

The goals of this package are the same as the commands package.

Index

Constants

This section is empty.

Variables

View Source
var Commands = cli.NewSubCommandHandler("table", "Commands for copying, renaming, deleting, and exporting tables.", []cli.Command{
	ImportCmd{},
	ExportCmd{},
	RmCmd{},
	MvCmd{},
	CpCmd{},
})

Functions

func NameAndTypeTransform

func NameAndTypeTransform(row sql.Row, rowOperationSchema sql.PrimaryKeySchema, rdSchema sql.PrimaryKeySchema, nameMapper rowconv.NameMapper) (sql.Row, error)

NameAndTypeTransform does 1) match the read and write schema with subsetting and name matching. 2) Address any type inconsistencies.

Types

type CpCmd

type CpCmd struct{}

func (CpCmd) ArgParser

func (cmd CpCmd) ArgParser() *argparser.ArgParser

func (CpCmd) CreateMarkdown

func (cmd CpCmd) CreateMarkdown(wr io.Writer, commandStr string) error

CreateMarkdown creates a markdown file containing the helptext for the command at the given path

func (CpCmd) Description

func (cmd CpCmd) Description() string

Description returns a description of the command

func (CpCmd) EventType

func (cmd CpCmd) EventType() eventsapi.ClientEventType

EventType returns the type of the event to log

func (CpCmd) Exec

func (cmd CpCmd) Exec(ctx context.Context, commandStr string, args []string, dEnv *env.DoltEnv) int

Exec executes the command

func (CpCmd) Name

func (cmd CpCmd) Name() string

Name is returns the name of the Dolt cli command. This is what is used on the command line to invoke the command

type ExportCmd

type ExportCmd struct{}

func (ExportCmd) ArgParser

func (cmd ExportCmd) ArgParser() *argparser.ArgParser

func (ExportCmd) CreateMarkdown

func (cmd ExportCmd) CreateMarkdown(wr io.Writer, commandStr string) error

CreateMarkdown creates a markdown file containing the helptext for the command at the given path

func (ExportCmd) Description

func (cmd ExportCmd) Description() string

Description returns a description of the command

func (ExportCmd) EventType

func (cmd ExportCmd) EventType() eventsapi.ClientEventType

EventType returns the type of the event to log

func (ExportCmd) Exec

func (cmd ExportCmd) Exec(ctx context.Context, commandStr string, args []string, dEnv *env.DoltEnv) int

Exec executes the command

func (ExportCmd) Name

func (cmd ExportCmd) Name() string

Name is returns the name of the Dolt cli command. This is what is used on the command line to invoke the command

type ImportCmd

type ImportCmd struct{}

func (ImportCmd) ArgParser

func (cmd ImportCmd) ArgParser() *argparser.ArgParser

func (ImportCmd) CreateMarkdown

func (cmd ImportCmd) CreateMarkdown(wr io.Writer, commandStr string) error

CreateMarkdown creates a markdown file containing the helptext for the command at the given path

func (ImportCmd) Description

func (cmd ImportCmd) Description() string

Description returns a description of the command

func (ImportCmd) EventType

func (cmd ImportCmd) EventType() eventsapi.ClientEventType

EventType returns the type of the event to log

func (ImportCmd) Exec

func (cmd ImportCmd) Exec(ctx context.Context, commandStr string, args []string, dEnv *env.DoltEnv) int

Exec executes the command

func (ImportCmd) Name

func (cmd ImportCmd) Name() string

Name is returns the name of the Dolt cli command. This is what is used on the command line to invoke the command

type MvCmd

type MvCmd struct{}

func (MvCmd) ArgParser

func (cmd MvCmd) ArgParser() *argparser.ArgParser

func (MvCmd) CreateMarkdown

func (cmd MvCmd) CreateMarkdown(wr io.Writer, commandStr string) error

CreateMarkdown creates a markdown file containing the helptext for the command at the given path

func (MvCmd) Description

func (cmd MvCmd) Description() string

Description returns a description of the command

func (MvCmd) EventType

func (cmd MvCmd) EventType() eventsapi.ClientEventType

EventType returns the type of the event to log

func (MvCmd) Exec

func (cmd MvCmd) Exec(ctx context.Context, commandStr string, args []string, dEnv *env.DoltEnv) int

Exec executes the command

func (MvCmd) Name

func (cmd MvCmd) Name() string

Name is returns the name of the Dolt cli command. This is what is used on the command line to invoke the command

type RmCmd

type RmCmd struct{}

func (RmCmd) ArgParser

func (cmd RmCmd) ArgParser() *argparser.ArgParser

func (RmCmd) CreateMarkdown

func (cmd RmCmd) CreateMarkdown(wr io.Writer, commandStr string) error

CreateMarkdown creates a markdown file containing the helptext for the command at the given path

func (RmCmd) Description

func (cmd RmCmd) Description() string

Description returns a description of the command

func (RmCmd) EventType

func (cmd RmCmd) EventType() eventsapi.ClientEventType

EventType returns the type of the event to log

func (RmCmd) Exec

func (cmd RmCmd) Exec(ctx context.Context, commandStr string, args []string, dEnv *env.DoltEnv) int

Exec executes the command

func (RmCmd) Name

func (cmd RmCmd) Name() string

Name is returns the name of the Dolt cli command. This is what is used on the command line to invoke the command

Jump to

Keyboard shortcuts

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