Esempio n. 1
0
        public override ISaver Create(string connectionString, CdmVersions cdmVersion, string sourceSchema, string destinationSchema)
        {
            CdmVersion        = cdmVersion;
            SourceSchema      = sourceSchema;
            DestinationSchema = destinationSchema;

            var odbcConnection = new OdbcConnectionStringBuilder(connectionString);
            var sqlConnection  = new MySqlConnectionStringBuilder
            {
                Server   = odbcConnection["server"].ToString(),
                UserID   = odbcConnection["user"].ToString(),
                Password = odbcConnection["password"].ToString(),
                Database = odbcConnection["database"].ToString(),
                DefaultCommandTimeout = 9999,
                ConnectionTimeout     = 9999,
                AllowLoadLocalInfile  = true
            };

            _connection  = SqlConnectionHelper.OpenMySqlConnection(sqlConnection.ConnectionString);
            _transaction = _connection.BeginTransaction();

            return(this);
        }