Skip to content

Commit

Permalink
[sql-hint addon] Autocomplete suggestion on _ $ and # for ODBC
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeeshanNoor authored Jun 15, 2020
1 parent a45f699 commit 3bf4968
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion addon/hint/sql-hint.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@
token.string = token.string.slice(0, cur.ch - token.start);
}

if (token.string.match(/^[.`"\w@]\w*$/)) {
if (token.string.match(/^[.`"\w@][\w$#]*$/g)) {
search = token.string;
start = token.start;
end = token.end;
Expand Down
2 changes: 1 addition & 1 deletion mode/sql/sql.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ CodeMirror.defineMode("sql", function(config, parserConfig) {
return null
// .table_name (ODBC)
// // ref: http://dev.mysql.com/doc/refman/5.6/en/identifier-qualifiers.html
if (support.ODBCdotTable && stream.match(/^[\w\d_]+/))
if (support.ODBCdotTable && stream.match(/^[\w\d_$#]+/))
return "variable-2";
} else if (operatorChars.test(ch)) {
// operators
Expand Down

0 comments on commit 3bf4968

Please sign in to comment.