]> git.joonet.de Git - adminer.git/commitdiff
Elasticsearch: Implemented function drop_tables()
authorTomas Lang <tomas.lang@smsbrana.cz>
Thu, 9 Jan 2014 21:53:23 +0000 (22:53 +0100)
committerJakub Vrana <jakub@vrana.cz>
Fri, 10 Jan 2014 06:26:39 +0000 (22:26 -0800)
adminer/drivers/elastic.inc.php

index f3100618bb34fb98617b7056bcae18ca25691631..2a79cb1bf35cc249cafbc5efd486120a6aa0c160 100644 (file)
@@ -297,6 +297,19 @@ if (isset($_GET["elastic"])) {
                return $connection->query(urlencode(implode(',', $databases)), array(), 'DELETE');
        }
 
+       /** Drop tables
+       * @param array
+       * @return bool
+       */
+       function drop_tables($tables) {
+               global $connection;
+               $result = true;
+               foreach ($tables as $table) { // convert to bulk api
+                       $result = $result && $connection->query(urlencode($table), array(), 'DELETE');
+               }
+               return $result;
+       }
+
        $jush = "elastic";
        $operators = array("=", "query");
        $functions = array();