Skip to content

odps查询时,表名补全提示有问题,根本就不提示 #1774

Answered by czxin788
czxin788 asked this question in Q&A
Discussion options

You must be logged in to vote

这个问题我解决了。
原因:
1、我在archery编辑器随便输入文本,chrome控制台报:
ext-language_tools.js:1
Uncaught TypeError: u.toLowerCase is not a function
at c.filterCompletions (ext-language_tools.js:1:31287)
at c.setFilter (ext-language_tools.js:1:30762)
at l.updateCompletions (ext-language_tools.js:1:27470)
at l. (ext-language_tools.js:1:22891)
at r (ace.js:1:29910)
2、于是我去static/ace/ext-language_tools.js文件,搜索u.toLowerCase处的代码,为了看出u是什么类型,我在这句话前面加了句console.log(typeof u);
3、然后在archery编辑器随便输入单词,在chrome 控制台,进行观察;
4、发现只要切换到odps类型的实例时,u的类型是string和object,报错的根源就是这个object类型,object当然没有toLowerCase()方法了;
5、但切换mysql类型实例时,u的类型只有string,所以执行u.toLowerCase()方法就不会报错;
6、于是我改了一下static/ace/ext-language_tools.js代码,当u的类型是object时,直接跳过,就正常了,即i…

Replies: 3 comments 5 replies

Comment options

You must be logged in to vote
1 reply
@czxin788
Comment options

Comment options

You must be logged in to vote
2 replies
@LeoQuote
Comment options

@czxin788
Comment options

Answer selected by czxin788
Comment options

You must be logged in to vote
2 replies
@feiazifeiazi
Comment options

@czxin788
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants