Changeset: 2a62ac0f6d16 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2a62ac0f6d16
Added Files:
        sql/backends/monet5/sql_rapi.c
        sql/backends/monet5/sql_rapi.h
Branch: RIntegration
Log Message:

The framework for external functions in R.


diffs (96 lines):

diff --git a/sql/backends/monet5/sql_rapi.c b/sql/backends/monet5/sql_rapi.c
new file mode 100644
--- /dev/null
+++ b/sql/backends/monet5/sql_rapi.c
@@ -0,0 +1,34 @@
+/*
+ * 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://www.monetdb.org/Legal/MonetDBLicense
+ *
+ * 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-2013 MonetDB B.V.
+ * All Rights Reserved.
+ */
+
+/*
+ * H. Muehleisen, M. Kersten
+ * The R interface
+ */
+#include "monetdb_config.h"
+#include "rapi.h"
+#include "sql_rapi.h"
+#include <string.h>
+
+str RAPIeval(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci) {
+       (void) cntxt;
+       (void) mb;
+       (void) pci;
+       throw(SQL,"RAPI", "NYD");
+}
diff --git a/sql/backends/monet5/sql_rapi.h b/sql/backends/monet5/sql_rapi.h
new file mode 100644
--- /dev/null
+++ b/sql/backends/monet5/sql_rapi.h
@@ -0,0 +1,52 @@
+/*
+ * 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://www.monetdb.org/Legal/MonetDBLicense
+ *
+ * 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-2013 MonetDB B.V.
+ * All Rights Reserved.
+ */
+
+/*
+ * H. Muehleisen, M. Kersten
+ * The R interface
+ */
+#ifndef _RAPI_SQL_LIB_
+#define _RAPI_SQL_LIB_
+
+#include "mal.h"
+#include "mal_exception.h"
+#include "mal_interpreter.h"
+
+// R headers
+//#include <Rembedded.h>
+//#include <Rdefines.h>
+//#define R_INTERFACE_PTRS
+//#include <Rinterface.h>
+//#include <Rinternals.h>
+//#include <R_ext/Parse.h>
+//
+#ifdef WIN32
+#ifndef LIBRAPI_SQL
+#define rapi_sql_export extern __declspec(dllimport)
+#else
+#define rapi_sql_export extern __declspec(dllexport)
+#endif
+#else
+#define rapi_sql_export extern
+#endif
+#define _RAPI_DEBUG_
+
+rapi_sql_export str RAPIevalSQL(Client cntxt, MalBlkPtr mb, MalStkPtr stk, 
InstrPtr pci);
+
+#endif /* _RAPI_SQL_LIB_ */
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to