Skip to content

Commit 3bf4968

Browse files
authored
[sql-hint addon] Autocomplete suggestion on _ $ and # for ODBC
1 parent a45f699 commit 3bf4968

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

addon/hint/sql-hint.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@
264264
token.string = token.string.slice(0, cur.ch - token.start);
265265
}
266266

267-
if (token.string.match(/^[.`"\w@]\w*$/)) {
267+
if (token.string.match(/^[.`"\w@][\w$#]*$/g)) {
268268
search = token.string;
269269
start = token.start;
270270
end = token.end;

mode/sql/sql.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ CodeMirror.defineMode("sql", function(config, parserConfig) {
9696
return null
9797
// .table_name (ODBC)
9898
// // ref: http://dev.mysql.com/doc/refman/5.6/en/identifier-qualifiers.html
99-
if (support.ODBCdotTable && stream.match(/^[\w\d_]+/))
99+
if (support.ODBCdotTable && stream.match(/^[\w\d_$#]+/))
100100
return "variable-2";
101101
} else if (operatorChars.test(ch)) {
102102
// operators

0 commit comments

Comments
 (0)