From e2a58877785dc01e7c683dd83c6975ac18881f49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=87=E5=A4=A9?= Date: Mon, 23 Sep 2019 16:21:36 +0800 Subject: [PATCH] fixed --- History.md | 2 +- lib/api.js | 2 +- lib/method.js | 2 +- package.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/History.md b/History.md index 5c3c715..eb760b0 100644 --- a/History.md +++ b/History.md @@ -1,4 +1,4 @@ -# 3.0.10 / 2019-09-23 +# 3.0.11 / 2019-09-23 * 优化数据库/表的删除判断; * 优化创建数据库/表时的默认配置顶; * 优化字段的默认值0的判断 diff --git a/lib/api.js b/lib/api.js index 1c24f04..e60dccd 100644 --- a/lib/api.js +++ b/lib/api.js @@ -79,7 +79,7 @@ class Api { let defer = Promise.defer() this.connect().then(conn => { - conn.query(`DROP DATABASE IF EXISTS \`${db || this.db}\``, err => { + conn.query(`DROP DATABASE IF EXISTS ${db || this.db}`, err => { conn.release() if (err) { return defer.reject(new SqlErr(`Drop database ${err}`)) diff --git a/lib/method.js b/lib/method.js index b3c9948..f18edfc 100644 --- a/lib/method.js +++ b/lib/method.js @@ -302,7 +302,7 @@ class Method { } drop() { - let sql = `DROP TABLE IF EXISTS \`${this.cache.table}\` ` + let sql = `DROP TABLE IF EXISTS ${this.cache.table} ` return this.connect().then(conn => { const defer = Promise.defer() diff --git a/package.json b/package.json index ceb43f2..689bb03 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mysqli", - "version": "3.0.10", + "version": "3.0.11", "description": "MySQL tool", "main": "index.js", "dependencies": {