pscan: add DROP DATABASE
This commit is contained in:
8
pscan.js
8
pscan.js
@ -75,6 +75,14 @@ function parseRecordStream(recs)
|
|||||||
};
|
};
|
||||||
stk.push(objDb);
|
stk.push(objDb);
|
||||||
|
|
||||||
|
} else if (current.op && current.op == 'DROP-DB') {
|
||||||
|
var objDb = {
|
||||||
|
verb: 'DROP_DATABASE',
|
||||||
|
name: current.name,
|
||||||
|
if_exists: current.if_exists,
|
||||||
|
};
|
||||||
|
stk.push(objDb);
|
||||||
|
|
||||||
} else if (current.op && current.op == 'SELECT') {
|
} else if (current.op && current.op == 'SELECT') {
|
||||||
var objSelect = {
|
var objSelect = {
|
||||||
verb: 'SELECT',
|
verb: 'SELECT',
|
||||||
|
@ -1 +1 @@
|
|||||||
CREATE DATABASE IF NOT EXISTS TheDbName;
|
CREATE DATABASE IF NOT EXISTS tester;
|
||||||
|
4
tst-create-table.sql
Normal file
4
tst-create-table.sql
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
create table if not exists tester (
|
||||||
|
name varchar(100) primary key,
|
||||||
|
age int not null
|
||||||
|
);
|
@ -1,6 +0,0 @@
|
|||||||
create table if not exists TheTableName (
|
|
||||||
id int(11) not null auto_increment primary key,
|
|
||||||
region varchar(32) not null,
|
|
||||||
data_size bigint not null default '0',
|
|
||||||
createtime datetime not null
|
|
||||||
);
|
|
3
tst-drop-db.sql
Normal file
3
tst-drop-db.sql
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
|
||||||
|
drop database if exists tester;
|
||||||
|
|
Reference in New Issue
Block a user