Changeset: 6eba5e80a181 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6eba5e80a181
Added Files:
        monetdb5/modules/mal/mal_mapi.c
        monetdb5/modules/mal/mal_mapi.h
        monetdb5/modules/mal/mal_mapi.mal
Removed Files:
        monetdb5/modules/mal/mal_mapi.mx
Modified Files:
        monetdb5/modules/mal/Makefile.ag
Branch: Jul2012
Log Message:

Converted mal_mapi.mx to .c/.h/.mal.


diffs (truncated from 1507 to 300 lines):

diff --git a/monetdb5/modules/mal/Makefile.ag b/monetdb5/modules/mal/Makefile.ag
--- a/monetdb5/modules/mal/Makefile.ag
+++ b/monetdb5/modules/mal/Makefile.ag
@@ -44,7 +44,7 @@ lib_mal = {
                inspect.mx \
                language.mx \
                mal_io.mx \
-               mal_mapi.mx \
+               mal_mapi.c mal_mapi.h \
                manual.c manual.h \
                mat.mx \
                mdb.mx \
@@ -77,12 +77,12 @@ headers_mal = {
                chopper.mal clients.mx \
                factories.mx groupby.mal mdb.mx pcre.mal tablet.mal mat.mx \
                urlbox.mx statistics.mx transaction.mal \
-               mal_mapi.mx sabaoth.mal remote.mal  \
+               mal_mapi.mal sabaoth.mal remote.mal  \
                txtsim.mal recycle.mal \
                cluster.mx trader.mal pma.mx \
                tokenizer.mx zorder.mx sample.mal
 }
 
-EXTRA_DIST = prelude.mx algebraExtensions.mal attach.mal batExtensions.mal 
chopper.mal constraints.mal groupby.mal histogram.mal mal_init.mal manual.mal 
mkey.mal pcre.mal profiler.mal recycle.mal remote.mal sabaoth.mal trader.mal 
transaction.mal txtsim.mal tablet.mal tablet.h sample.mal
+EXTRA_DIST = prelude.mx algebraExtensions.mal attach.mal batExtensions.mal 
chopper.mal constraints.mal groupby.mal histogram.mal mal_init.mal manual.mal 
mkey.mal pcre.mal profiler.mal recycle.mal remote.mal sabaoth.mal trader.mal 
transaction.mal txtsim.mal tablet.mal tablet.h sample.mal mal_mapi.mal
 
 EXTRA_DIST_DIR = Tests
diff --git a/monetdb5/modules/mal/mal_mapi.mx b/monetdb5/modules/mal/mal_mapi.c
rename from monetdb5/modules/mal/mal_mapi.mx
rename to monetdb5/modules/mal/mal_mapi.c
--- a/monetdb5/modules/mal/mal_mapi.mx
+++ b/monetdb5/modules/mal/mal_mapi.c
@@ -1,25 +1,22 @@
-@/
-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
+/*
+ * 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-2012 MonetDB B.V.
+ * All Rights Reserved.
+ */
 
-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-2012 MonetDB B.V.
-All Rights Reserved.
-@
-
-@f mal_mapi
-
-@c
 /*
  * @a N.J. Nes P. Boncz, S. Mullender, M. Kersten
  * @v 1.1
@@ -42,300 +39,6 @@ All Rights Reserved.
  * A cleaner and simplier interface for distributed processing is available in
  * the module remote.
  */
-@mal
-module mapi;
-
-command listen():int
-address SERVERlisten_default
-comment "Start a Mapi server with the default settings.";
-command listen(port:int):int
-address SERVERlisten_port
-comment "Start a Mapi listener on the port given.";
-command listen(unixsocket:str):int
-address SERVERlisten_usock
-comment "Start a Mapi listener on the unix socket file given.";
-
-command stop():void
-address SERVERstop
-comment "Terminate connection listeners."; 
-
-command suspend():void
-address SERVERsuspend
-comment "Suspend accepting connections.";
-
-command resume():void
-address SERVERresume
-comment "Resume connection listeners.";
-
-command malclient(in:streams, out:streams):void
-address SERVERclient
-comment "Start a Mapi client for a particular stream pair.";
-
-
-command trace(mid:int,flag:int):void
-address SERVERtrace
-comment "Toggle the Mapi library debug tracer.";
-
-pattern reconnect(host:str, port:int, usr:str, passwd:str,lang:str):int
-address SERVERreconnectWithoutAlias
-comment "Re-establish connection with a remote mserver.";
-
-pattern reconnect(host:str, port:int, db_alias:str, usr:str, 
passwd:str,lang:str):int
-address SERVERreconnectAlias
-comment "Re-establish connection with a remote mserver.";
-
-command reconnect(mid:int):void
-address SERVERreconnect
-comment "Re-establish a connection.";
-
-pattern connect(host:str, port:int, usr:str, passwd:str,lang:str):int
-address SERVERconnect
-comment "Establish connection with a remote mserver.";
-
-command disconnect(dbalias:str):int
-address SERVERdisconnectWithAlias
-comment "Close connection with a remote Mserver.";
-
-command disconnect():int
-address SERVERdisconnectALL
-comment "Close connections with all remote Mserver.";
-
-command setAlias(dbalias:str)
-address SERVERsetAlias
-comment "Give the channel a logical name.";
-
-command lookup(dbalias:str):int
-address SERVERlookup
-comment "Retrieve the connection identifier.";
-
-command disconnect(mid:int):void
-address SERVERdisconnect
-comment "Terminate the session.";
-
-command destroy(mid:int):void
-address SERVERdestroy
-comment "Destroy the handle for an Mserver.";
-
-command ping(mid:int):int
-address SERVERping
-comment "Test availability of an Mserver.";
-
-command query(mid:int, qry:str):int
-address SERVERquery
-comment "Send the query for execution";
-
-command query_handle(mid:int, qry:str):int
-address SERVERquery_handle
-comment "Send the query for execution.";
-
-pattern query_array(mid:int, qry:str, arg:str...):int
-address SERVERquery_array
-comment "Send the query for execution replacing '?' by arguments.";
-
-command prepare(mid:int, qry:str):int
-address SERVERprepare
-comment "Prepare a query for execution.";
-
-command finish(hdl:int):int
-address SERVERfinish
-comment "Remove all remaining answers.";
-
-command get_field_count(hdl:int):int
-address SERVERget_field_count
-comment "Return number of fields.";
-
-command get_row_count(hdl:int):lng
-address SERVERget_row_count
-comment "Return number of rows.";
-
-command rows_affected(hdl:int):lng
-address SERVERrows_affected
-comment "Return number of affected rows.";
-
-command fetch_row(hdl:int):int
-address SERVERfetch_row
-comment "Retrieve the next row for analysis.";
-
-command fetch_all_rows(hdl:int):lng
-address SERVERfetch_all_rows
-comment "Retrieve all rows into the cache.";
-
-command fetch_field(hdl:int,fnr:int):str
-address SERVERfetch_field_str
-comment "Retrieve a single field.";
-
-command fetch_field(hdl:int,fnr:int):int
-address SERVERfetch_field_int
-comment "Retrieve a single int field.";
-
-command fetch_field(hdl:int,fnr:int):lng
-address SERVERfetch_field_lng
-comment "Retrieve a single lng field.";
-
-command fetch_field(hdl:int,fnr:int):sht
-address SERVERfetch_field_sht
-comment "Retrieve a single sht field.";
-
-command fetch_field(hdl:int,fnr:int):void
-address SERVERfetch_field_void
-comment "Retrieve a single void field.";
-
-command fetch_field(hdl:int,fnr:int):oid
-address SERVERfetch_field_oid
-comment "Retrieve a single void field.";
-
-command fetch_field(hdl:int,fnr:int):bte
-address SERVERfetch_field_bte
-comment "Retrieve a single bte field.";
-
-command fetch_field_array(hdl:int):bat[:int,:str]
-address SERVERfetch_field_bat
-comment "Retrieve all fields for a row.";
-
-command fetch_line(hdl:int):str
-address SERVERfetch_line
-comment "Retrieve a complete line.";
-
-command fetch_reset(hdl:int):int
-address SERVERfetch_reset
-comment "Reset the cache read line.";
-
-command next_result(hdl:int):int
-address SERVERnext_result
-comment "Go to next result set.";
-
-command error(mid:int):int
-address SERVERerror
-comment "Check for an error in the communication.";
-
-command getError(mid:int):str
-address SERVERgetError
-comment "Get error message.";
-
-command explain(mid:int):str
-address SERVERexplain
-comment "Turn the error seen into a string.";
-
-pattern put(mid:int, nme:str, val:any_1):void
-address SERVERput
-comment "Send a value to a remote site.";
-
-pattern put(nme:str, val:any_1):str
-address SERVERputLocal
-comment "Prepare sending a value to a remote site.";
-
-pattern rpc(key:int,qry:str...):any
-address SERVERmapi_rpc_single_row
-comment "Send a simple query for execution and fetch result.";
-
-pattern rpc(key:int,qry:str):bat[:any_1,:any_2]
-address SERVERmapi_rpc_bat;
-
-command rpc(key:int,qry:str):void
-address SERVERquery
-comment "Send a simple query for execution.";
-
-pattern 
bind(key:int,rschema:str,rtable:str,rcolumn:str,i:int):bat[:any_1,:any_2]
-address SERVERbindBAT
-comment "Bind a remote variable to a local one.";
-
-pattern bind(key:int,rschema:str,rtable:str,i:int):bat[:any_1,:any_2]
-address SERVERbindBAT
-comment "Bind a remote variable to a local one.";
-
-pattern bind(key:int,remoteName:str):bat[:any_1,:any_2]
-address SERVERbindBAT
-comment "Bind a remote variable to a local one.";
-
-
-mapi.listen();
-@h
-#ifndef SERVER_H
-#define SERVER_H
-/* #define DEBUG_SERVER */
-
-#include "mal_client.h"
-#include "mal_session.h"
-#include "mal_exception.h"
-#include "mal_interpreter.h"
-#include "mal_authorize.h"
-#include "msabaoth.h"
-#include "mcrypt.h"
-#include <stream.h>
_______________________________________________
Checkin-list mailing list
Checkin-list@monetdb.org
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to