7474const migrationMetadataKey = "cloud-spanner-migration-metadata"
7575
7676// SchemaConv performs the schema conversion
77- // TODO: Pass around cmd.SourceProfile instead of sqlConnectionStr and schemaSampleSize.
78- // Doing that requires refactoring since that would introduce a circular dependency between
79- // conversion.go and cmd/source_profile.go.
80- // The sqlConnectionStr param provides the connection details to use the go SQL library.
81- // It is empty in the following cases:
82- // - Driver is DynamoDB or a dump file mode.
83- // - This function is called as part of the legacy global CLI flag mode. (This string is constructed from env variables later on)
84- // When using source-profile, the sqlConnectionStr is constructed from the input params.
77+ // The SourceProfile param provides the connection details to use the go SQL library.
8578func SchemaConv (sourceProfile profiles.SourceProfile , targetProfile profiles.TargetProfile , ioHelper * utils.IOStreams ) (* internal.Conv , error ) {
8679 switch sourceProfile .Driver {
8780 case constants .POSTGRES , constants .MYSQL , constants .DYNAMODB , constants .SQLSERVER , constants .ORACLE :
@@ -94,11 +87,7 @@ func SchemaConv(sourceProfile profiles.SourceProfile, targetProfile profiles.Tar
9487}
9588
9689// DataConv performs the data conversion
97- // The sqlConnectionStr param provides the connection details to use the go SQL library.
98- // It is empty in the following cases:
99- // - Driver is DynamoDB or a dump file mode.
100- // - This function is called as part of the legacy global CLI flag mode. (This string is constructed from env variables later on)
101- // When using source-profile, the sqlConnectionStr and schemaSampleSize are constructed from the input params.
90+ // The SourceProfile param provides the connection details to use the go SQL library.
10291func DataConv (ctx context.Context , sourceProfile profiles.SourceProfile , targetProfile profiles.TargetProfile , ioHelper * utils.IOStreams , client * sp.Client , conv * internal.Conv , dataOnly bool , writeLimit int64 ) (* writer.BatchWriter , error ) {
10392 config := writer.BatchWriterConfig {
10493 BytesLimit : 100 * 1000 * 1000 ,
0 commit comments