MongoDB driver: Add create_database methods.

MongoDB databases are created on the fly when some data is written in
the database, so this method does not need to do anything.
This commit is contained in:
David Sinquin 2018-02-27 13:43:32 +01:00 committed by Jakub Vrana
parent 26a3967cf9
commit cf9cad66e2

View file

@ -171,6 +171,10 @@ if (isset($_GET["mongo"])) {
return array_fill_keys($connection->_db->getCollectionNames(true), 'table');
}
function create_database($db, $collation) {
return true;
}
function drop_databases($databases) {
global $connection;
foreach ($databases as $db) {
@ -436,6 +440,10 @@ if (isset($_GET["mongo"])) {
return $collections;
}
function create_database($db, $collation) {
return true;
}
function drop_databases($databases) {
return false;
}