Skip to content

Commit

Permalink
Elasticsearch: Implemented function drop_tables()
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomas Lang authored and vrana committed Jan 10, 2014
1 parent 1bb4360 commit b40bfb9
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions adminer/drivers/elastic.inc.php
Expand Up @@ -297,6 +297,19 @@ function drop_databases($databases) {
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();
Expand Down

0 comments on commit b40bfb9

Please sign in to comment.