Changeset: 96ca0bb1e430 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=96ca0bb1e430
Modified Files:
        clients/ChangeLog
        clients/php/lib/php_mapi.inc
        clients/php/lib/php_monetdb.php
Branch: default
Log Message:

php: drop xquery support


diffs (102 lines):

diff --git a/clients/ChangeLog b/clients/ChangeLog
--- a/clients/ChangeLog
+++ b/clients/ChangeLog
@@ -2,7 +2,7 @@
 # This file is updated with Maddlog
 
 * Mon Feb  7 2011 Fabian Groffen <[email protected]>
-- Remove XQuery related code from Ruby adapter
+- Remove XQuery related code from Ruby adapter and PHP driver
 
 * Thu Feb  3 2011 Fabian Groffen <[email protected]>
 - Make SQL the default language for mclient, e.g. to use when --language=
diff --git a/clients/php/lib/php_mapi.inc b/clients/php/lib/php_mapi.inc
--- a/clients/php/lib/php_mapi.inc
+++ b/clients/php/lib/php_mapi.inc
@@ -41,9 +41,6 @@
        define("PROTOCOL_v9", 9); // supported protocol(s)
 
        define("LANG_SQL", "sql");
-       define("LANG_XQUERY", "xquery");
-
-       define("XQUERY_OUTPUT_SEQ", "output seq");
 
        define("MEROVINGIAN", "merovingian");
        define("MSERVER", "mserver");
@@ -91,9 +88,7 @@
                $buf = mapi_write($socket, format_query($query, $conn["lang"]));
                $data = mapi_read($socket);
 
-               if ( ($conn['lang'] == LANG_SQL) || ( ($conn['lang'] == 
LANG_XQUERY) && (defined('XQUERY_OUTPUT_SEQ')) ) ) {
-                       /* We are using sql or xquery with 'outpu seq' */
-
+               if ($conn['lang'] == LANG_SQL) {
                        $handle = array("conn" => "", "header" => array(), 
"query" => "", "record_set" => array(), "operation" => -1, "last_row" => 0);
                        $handle["conn"] = $conn["id"];
 
@@ -115,10 +110,6 @@
 
                        return $handle;
                }
-               else if (($conn['lang'] == LANG_XQUERY) && 
(!defined('XQUERY_OUTPUT_SEQ'))) {
-                       /* We are using xquery without 'output seq'. Return the 
xml file */
-                       return $data;
-               }
        }
 
        function mapi_fetch_next($conn, &$handle){
@@ -610,12 +601,6 @@
                                        $last_error = $response;
                                        return FALSE;
                                }
-                       } else if (($options['lang'] == LANG_XQUERY) && 
(defined('XQUERY_OUTPUT_SEQ'))) {
-                               $buf = mapi_write($socket, 
format_command("output seq"));
-                               if ( ($response = mapi_read($socket)) != 
MSG_PROMPT) {
-                                       $last_error = $response;
-                                       return FALSE;
-                               }
                        } else {
                                return FALSE;
                        }
@@ -650,10 +635,6 @@
                                case LANG_SQL:
                                        $res = mapi_execute($conn, "select 
true;");
                                        break;
-
-                               case LANG_XQUERY:
-                                       $res = mapi_execute($conn, 
"io.print(1);");
-                                       break;
                        }
                        if ($res != NULL) {
                                if (mapi_free_result($conn['id'], $res['id'])) {
@@ -790,9 +771,6 @@
 
                        return "s" . $query . ";";
                }
-               else if ($lang == LANG_XQUERY) {
-                       return "s" . $query;
-               }
                return FALSE;
        }
 
diff --git a/clients/php/lib/php_monetdb.php b/clients/php/lib/php_monetdb.php
--- a/clients/php/lib/php_monetdb.php
+++ b/clients/php/lib/php_monetdb.php
@@ -36,7 +36,7 @@
        /**
         * Opens a connection to a MonetDB server.  
         * 
-        * @param string language to be used (sql or xquery)
+        * @param string language to be used (sql)
         * @param string hostname to connect to (default is localhost)
         * @param int    port to use (default is 50000)
         * @param string username (default is monetdb)
@@ -81,7 +81,7 @@
         *
         * This type of link is therefore called 'persistent'. 
         *
-        * @param string language to be used (sql or xquery)
+        * @param string language to be used (sql)
         * @param string hostname to connect to (default is localhost)
         * @param int    port to use (default is 50000)
         * @param string username (default is monetdb)
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to