Ejemplo n.º 1
0
 protected virtual SqlStatement VisitCreateExternProcedure(CreateExternalProcedureStatement statement)
 {
     return(new CreateExternalProcedureStatement(statement.ProcedureName, statement.Parameters,
                                                 statement.ExternalReference)
     {
         ReplaceIfExists = statement.ReplaceIfExists
     });
 }
        public static void ExternalWithNoArguments()
        {
            var statement = new CreateExternalProcedureStatement(ObjectName.Parse("SYS.ext_proc2"), "Deveel.Data.ExtProcedures.Proc1()");

            var sql = statement.ToString();
            var expected = new StringBuilder();
            expected.AppendLine("CREATE EXTERNAL PROCEDURE SYS.ext_proc2() IS");
            expected.Append("  LANGUAGE DOTNET NAME 'Deveel.Data.ExtProcedures.Proc1()'");

            Assert.AreEqual(expected.ToString(), sql);
        }
        public static void ExternalWithNoArguments()
        {
            var statement = new CreateExternalProcedureStatement(ObjectName.Parse("SYS.ext_proc2"), "Deveel.Data.ExtProcedures.Proc1()");

            var sql      = statement.ToString();
            var expected = new StringBuilder();

            expected.AppendLine("CREATE EXTERNAL PROCEDURE SYS.ext_proc2() IS");
            expected.Append("  LANGUAGE DOTNET NAME 'Deveel.Data.ExtProcedures.Proc1()'");

            Assert.AreEqual(expected.ToString(), sql);
        }
Ejemplo n.º 4
0
 protected virtual SqlStatement VisitCreateExternProcedure(CreateExternalProcedureStatement statement)
 {
     return new CreateExternalProcedureStatement(statement.ProcedureName, statement.Parameters,
         statement.ExternalReference) {
             ReplaceIfExists = statement.ReplaceIfExists
         };
 }