Exemplo n.º 1
0
        /// <summary>
        /// Creates or updates the procedure on the database if the database does support procedures.
        /// </summary>
        internal void Execute()
        {
            if (!DbConnectionManager.SupportProcedures)
            {
                throw new NotSupportedException($"This task is not supported with the current connection manager ({ConnectionType})");
            }

            IsExisting = new IfProcedureExistsTask(ProcedureName)
            {
                ConnectionManager = this.ConnectionManager, DisableLogging = true
            }.Exists();
            if (IsExisting && ConnectionType == ConnectionManagerType.MySql)
            {
                new DropProcedureTask(ProcedureName)
                {
                    ConnectionManager = this.ConnectionManager, DisableLogging = true
                }
            }
Exemplo n.º 2
0
        /// <summary>
        /// Creates or updates the procedure on the database if the database does support procedures.
        /// </summary>
        public void Execute()
        {
            if (!DbConnectionManager.SupportProcedures)
            {
                throw new ETLBoxNotSupportedException("This task is not supported!");
            }

            IsExisting = new IfProcedureExistsTask(ProcedureName)
            {
                ConnectionManager = this.ConnectionManager, DisableLogging = true
            }.Exists();
            if (IsExisting && ConnectionType == ConnectionManagerType.MySql)
            {
                new DropProcedureTask(ProcedureName)
                {
                    ConnectionManager = this.ConnectionManager, DisableLogging = true
                }
            }