Documentation ¶
Index ¶
- Constants
- func CreateDatabaseClient(ctx context.Context, targetProfile profiles.TargetProfile, ...) (*database.DatabaseAdminClient, *sp.Client, string, error)
- func MigrateDatabase(ctx context.Context, targetProfile profiles.TargetProfile, ...) (*writer.BatchWriter, error)
- func PrepareMigrationPrerequisites(sourceProfileString, targetProfileString, source string) (profiles.SourceProfile, profiles.TargetProfile, utils.IOStreams, string, error)
- type DataCmd
- type SchemaAndDataCmd
- func (cmd *SchemaAndDataCmd) Execute(ctx context.Context, f *flag.FlagSet, _ ...interface{}) subcommands.ExitStatus
- func (cmd *SchemaAndDataCmd) Name() string
- func (cmd *SchemaAndDataCmd) SetFlags(f *flag.FlagSet)
- func (cmd *SchemaAndDataCmd) Synopsis() string
- func (cmd *SchemaAndDataCmd) Usage() string
- type SchemaCmd
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
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
Click to show internal directories.
Click to hide internal directories.