--- /dev/null
+<?php
+#
+# !!! MANDATORY !!!
+#
+if (true or !nb::is_vm()) $DBQ = [
+ 'shell' => [
+ 'type' => 'sqlite',
+ 'name' => 'shell',
+ 'default_table' => 'shell_function',
+ 'host' => nb::ROOT_DIR.'/share/db/shell.db',
+ ],
+];
+?>
+++ /dev/null
-<?php
-#
-# !!! MANDATORY !!!
-#
-if (true or !nb::is_vm()) $DBQ = [
- 'shell' => [
- 'type' => 'sqlite',
- 'name' => 'shell',
- 'default_table' => 'shell_function',
- 'host' => nb::ROOT_DIR.'/share/db/shell.db',
- ],
-];
-?>
public function disconnect() {
if (empty($this->conn)) return null;
- #$this->conn->exec('COMMIT');
$this->method('disconnect');
# NB 09.09.16 return $this->conn->close();
}
#debug($sql);
return $sql;
},
+'disconnect' => function($Db) {
+ foreach ($Db->sql_pre() as $s) { if ($s = preg_replace('/^ATTACH DATABASE.*? as (.*?)$/','DETACH DATABASE $1',$s)) $Db->conn->exec($s); }
+},
);?>