Commit d0f9b180 authored by Medicean's avatar Medicean

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

parent 5da9fd1c
......@@ -527,8 +527,7 @@ class ASP {
.request(this.core[`database_${conf['type']}`].show_databases({
conn: conf['conn'],
dbname: ['access', 'microsoft_jet_oledb_4_0'].indexOf(conf['type']) > -1 ?
conf['conn'].match(/[\w]+.mdb$/) :
'database'
conf['conn'].match(/[\w]+.mdb$/) : 'database'
}))
.then((res) => {
let ret = res['text'];
......@@ -694,7 +693,7 @@ class ASP {
return
};
const _column = Buffer
.from(_.substr(_, _.lastIndexOf(' ')))
.from(_.substr(0, _.length - _.lastIndexOf(' ')))
.toString('base64');
this
.tree
......
......@@ -512,8 +512,7 @@ class CUSTOM {
conn: conf['conn'],
encode: this.manager.opt.encode,
db: ['access', 'microsoft_jet_oledb_4_0'].indexOf(conf['type']) > -1 ?
conf['conn'].match(/[\w]+.mdb$/) :
'database'
conf['conn'].match(/[\w]+.mdb$/) : 'database'
}))
.then((res) => {
let ret = res['text'];
......@@ -656,7 +655,7 @@ class CUSTOM {
return
};
const _column = Buffer
.from(_.substr(_, _.lastIndexOf(' ')))
.from(_.substr(0, _.length - _.lastIndexOf(' ')))
.toString('base64');
this
.tree
......
......@@ -1475,7 +1475,7 @@ class PHP {
// 添加子节点
arr.map((_) => {
if (!_) { return };
const _column = Buffer.from(_.substr(_, _.lastIndexOf(' '))).toString('base64');
const _column = Buffer.from(_.substr(0, _.length - _.lastIndexOf(' '))).toString('base64');
this.tree.insertNewItem(
`table::${id}:${_db}:${_table}`,
`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