Exemplo n.º 1
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());
        }