Changeset: 0edc9534b675 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0edc9534b675
Modified Files:
        sql/backends/monet5/UDF/80_udf.mal
        sql/backends/monet5/UDF/Makefile.ag
        sql/backends/monet5/UDF/README
        sql/backends/monet5/UDF/udf.sql
Branch: default
Log Message:

Reshuffling the UDF example


diffs (65 lines):

diff --git a/sql/backends/monet5/UDF/80_udf.mal 
b/sql/backends/monet5/UDF/80_udf.mal
--- a/sql/backends/monet5/UDF/80_udf.mal
+++ b/sql/backends/monet5/UDF/80_udf.mal
@@ -15,5 +15,15 @@
 # Copyright August 2008-2011 MonetDB B.V.
 # All Rights Reserved.
 
-# This loads the MonetDB/SQL module
-#include udf;
+# This announces the UDF module to the MAL interpreter
+
+module udf;
+
+command reverse(ra1:str):str
+address UDFreverse
+comment "Reverse a string";
+
+command reverse(b:bat[:oid,:str]):bat[:oid,:str]
+address UDFBATreverse
+comment "Reverse a BAT of strings");
+
diff --git a/sql/backends/monet5/UDF/Makefile.ag 
b/sql/backends/monet5/UDF/Makefile.ag
--- a/sql/backends/monet5/UDF/Makefile.ag
+++ b/sql/backends/monet5/UDF/Makefile.ag
@@ -48,7 +48,7 @@
 headers_sql = {
        HEADERS = sql
        DIR = libdir/monetdb5
-       SOURCES = udf.sql
+       SOURCES = 80_udf.sql
 }
 
 headers_autoload = {
diff --git a/sql/backends/monet5/UDF/README b/sql/backends/monet5/UDF/README
--- a/sql/backends/monet5/UDF/README
+++ b/sql/backends/monet5/UDF/README
@@ -1,1 +1,2 @@
 This directory is a template for extending SQL with a new scalar type.
+See the website for further documentation.
diff --git a/sql/backends/monet5/UDF/udf.sql b/sql/backends/monet5/UDF/udf.sql
deleted file mode 100644
--- a/sql/backends/monet5/UDF/udf.sql
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
-The contents of this file are subject to the MonetDB Public License
-Version 1.1 (the "License"); you may not use this file except in
-compliance with the License. You may obtain a copy of the License at
-http://monetdb.cwi.nl/Legal/MonetDBLicense-1.1.html
-
-Software distributed under the License is distributed on an "AS IS"
-basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
-License for the specific language governing rights and limitations
-under the License.
-
-The Original Code is the MonetDB Database System.
-
-The Initial Developer of the Original Code is CWI.
-Portions created by CWI are Copyright (C) 1997-July 2008 CWI.
-Copyright August 2008-2011 MonetDB B.V.
-All Rights Reserved.
-*/
-
-create function reverse(src string)
-returns string external name udf.reverse;
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to