Commit d0f9b180 authored by Medicean's avatar Medicean

(Fix: Databases) 修正获取列名后处理问题

parent 5da9fd1c
...@@ -527,8 +527,7 @@ class ASP { ...@@ -527,8 +527,7 @@ class ASP {
.request(this.core[`database_${conf['type']}`].show_databases({ .request(this.core[`database_${conf['type']}`].show_databases({
conn: conf['conn'], conn: conf['conn'],
dbname: ['access', 'microsoft_jet_oledb_4_0'].indexOf(conf['type']) > -1 ? dbname: ['access', 'microsoft_jet_oledb_4_0'].indexOf(conf['type']) > -1 ?
conf['conn'].match(/[\w]+.mdb$/) : conf['conn'].match(/[\w]+.mdb$/) : 'database'
'database'
})) }))
.then((res) => { .then((res) => {
let ret = res['text']; let ret = res['text'];
...@@ -694,7 +693,7 @@ class ASP { ...@@ -694,7 +693,7 @@ class ASP {
return return
}; };
const _column = Buffer const _column = Buffer
.from(_.substr(_, _.lastIndexOf(' '))) .from(_.substr(0, _.length - _.lastIndexOf(' ')))
.toString('base64'); .toString('base64');
this this
.tree .tree
......
...@@ -512,8 +512,7 @@ class CUSTOM { ...@@ -512,8 +512,7 @@ class CUSTOM {
conn: conf['conn'], conn: conf['conn'],
encode: this.manager.opt.encode, encode: this.manager.opt.encode,
db: ['access', 'microsoft_jet_oledb_4_0'].indexOf(conf['type']) > -1 ? db: ['access', 'microsoft_jet_oledb_4_0'].indexOf(conf['type']) > -1 ?
conf['conn'].match(/[\w]+.mdb$/) : conf['conn'].match(/[\w]+.mdb$/) : 'database'
'database'
})) }))
.then((res) => { .then((res) => {
let ret = res['text']; let ret = res['text'];
...@@ -656,7 +655,7 @@ class CUSTOM { ...@@ -656,7 +655,7 @@ class CUSTOM {
return return
}; };
const _column = Buffer const _column = Buffer
.from(_.substr(_, _.lastIndexOf(' '))) .from(_.substr(0, _.length - _.lastIndexOf(' ')))
.toString('base64'); .toString('base64');
this this
.tree .tree
......
...@@ -1475,7 +1475,7 @@ class PHP { ...@@ -1475,7 +1475,7 @@ class PHP {
// 添加子节点 // 添加子节点
arr.map((_) => { arr.map((_) => {
if (!_) { return }; if (!_) { return };
const _column = Buffer.from(_.substr(_, _.lastIndexOf(' '))).toString('base64'); const _column = Buffer.from(_.substr(0, _.length - _.lastIndexOf(' '))).toString('base64');
this.tree.insertNewItem( this.tree.insertNewItem(
`table::${id}:${_db}:${_table}`, `table::${id}:${_db}:${_table}`,
`column::${id}:${_db}:${_table}:${_column}`, `column::${id}:${_db}:${_table}:${_column}`,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment