cmd

package
v1.0.1-0...-1811ebb Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultWritersLimit = 40
)

Variables

This section is empty.

Functions

func CreateDatabaseClient

func CreateDatabaseClient(ctx context.Context, targetProfile profiles.TargetProfile, driver, dbName string, ioHelper utils.IOStreams) (*database.DatabaseAdminClient, *sp.Client, string, error)

CreateDatabaseClient creates new database client and admin client.

func MigrateDatabase

func MigrateDatabase(ctx context.Context, targetProfile profiles.TargetProfile, sourceProfile profiles.SourceProfile, dbName string, ioHelper *utils.IOStreams, cmd interface{}, conv *internal.Conv, migrationError *error) (*writer.BatchWriter, error)

MigrateData creates database and populates data in it.

func PrepareMigrationPrerequisites

func PrepareMigrationPrerequisites(sourceProfileString, targetProfileString, source string) (profiles.SourceProfile, profiles.TargetProfile, utils.IOStreams, string, error)

PrepareMigrationPrerequisites creates source and target profiles, opens a new IOStream and generates the database name.

Types

type DataCmd

type DataCmd struct {
	WriteLimit int64

	SkipForeignKeys bool
	// contains filtered or unexported fields
}

DataCmd struct with flags.

func (*DataCmd) Execute

func (cmd *DataCmd) Execute(ctx context.Context, f *flag.FlagSet, _ ...interface{}) subcommands.ExitStatus

func (*DataCmd) Name

func (cmd *DataCmd) Name() string

Name returns the name of operation.

func (*DataCmd) SetFlags

func (cmd *DataCmd) SetFlags(f *flag.FlagSet)

SetFlags sets the flags.

func (*DataCmd) Synopsis

func (cmd *DataCmd) Synopsis() string

Synopsis returns summary of operation.

func (*DataCmd) Usage

func (cmd *DataCmd) Usage() string

Usage returns usage info of the command.

type SchemaAndDataCmd

type SchemaAndDataCmd struct {
	SkipForeignKeys bool

	WriteLimit int64
	// contains filtered or unexported fields
}

SchemaAndDataCmd struct with flags.

func (*SchemaAndDataCmd) Execute

func (cmd *SchemaAndDataCmd) Execute(ctx context.Context, f *flag.FlagSet, _ ...interface{}) subcommands.ExitStatus

func (*SchemaAndDataCmd) Name

func (cmd *SchemaAndDataCmd) Name() string

Name returns the name of operation.

func (*SchemaAndDataCmd) SetFlags

func (cmd *SchemaAndDataCmd) SetFlags(f *flag.FlagSet)

SetFlags sets the flags.

func (*SchemaAndDataCmd) Synopsis

func (cmd *SchemaAndDataCmd) Synopsis() string

Synopsis returns summary of operation.

func (*SchemaAndDataCmd) Usage

func (cmd *SchemaAndDataCmd) Usage() string

Usage returns usage info of the command.

type SchemaCmd

type SchemaCmd struct {
	// contains filtered or unexported fields
}

SchemaCmd struct with flags.

func (*SchemaCmd) Execute

func (cmd *SchemaCmd) Execute(ctx context.Context, f *flag.FlagSet, _ ...interface{}) subcommands.ExitStatus

func (*SchemaCmd) Name

func (cmd *SchemaCmd) Name() string

Name returns the name of operation.

func (*SchemaCmd) SetFlags

func (cmd *SchemaCmd) SetFlags(f *flag.FlagSet)

SetFlags sets the flags.

func (*SchemaCmd) Synopsis

func (cmd *SchemaCmd) Synopsis() string

Synopsis returns summary of operation.

func (*SchemaCmd) Usage

func (cmd *SchemaCmd) Usage() string

Usage returns usage info of the command.

Jump to

Keyboard shortcuts

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