コード例 #1
0
        public override string AddProcedure(DatabaseStoredProcedure procedure)
        {
            if (string.IsNullOrEmpty(procedure.Sql))
            {
                //the procedure.Sql contains the BEGIN to END statements, not the CREATE PROCEDURE and arguments.
                //for now, just comment
                return "-- add procedure " + procedure.Name;
            }

            var name = procedure.Name;
            var procWriter = new ProcedureWriter(name, null);
            WriteProcedure(procedure, procWriter);

            return procWriter.End();
        }
コード例 #2
0
        public override string AddProcedure(DatabaseStoredProcedure procedure)
        {
            if (string.IsNullOrEmpty(procedure.Sql))
            {
                //the procedure.Sql contains the BEGIN to END statements, not the CREATE PROCEDURE and arguments.
                //for now, just comment
                return("-- add procedure " + procedure.Name);
            }

            var name       = procedure.Name;
            var procWriter = new ProcedureWriter(name, null);

            WriteProcedure(procedure, procWriter);

            return(procWriter.End());
        }
コード例 #3
0
        public override string AddFunction(DatabaseFunction databaseFunction)
        {
            if (string.IsNullOrEmpty(databaseFunction.Sql))
            {
                //the function.Sql contains the BEGIN to END statements, not the CREATE FUNCTION and arguments.
                //for now, just comment
                return("-- add function " + databaseFunction.Name);
            }

            var name       = databaseFunction.Name;
            var procWriter = new ProcedureWriter(name, true);

            procWriter.AddReturns(databaseFunction.ReturnType);
            WriteProcedure(databaseFunction, procWriter);

            return(procWriter.End());
        }
コード例 #4
0
        public override string AddFunction(DatabaseFunction databaseFunction)
        {
            if (string.IsNullOrEmpty(databaseFunction.Sql))
            {
                //the function.Sql contains the BEGIN to END statements, not the CREATE FUNCTION and arguments.
                //for now, just comment
                return "-- add function " + databaseFunction.Name;
            }

            var name = databaseFunction.Name;
            var procWriter = new ProcedureWriter(name, true);
            procWriter.AddReturns(databaseFunction.ReturnType);
            WriteProcedure(databaseFunction, procWriter);

            return procWriter.End();

        }