Skip to content

Commit

Permalink
Improve keyword completion
Browse files Browse the repository at this point in the history
  • Loading branch information
lighttiger2505 committed Feb 7, 2021
1 parent 72db60c commit 94a78f2
Show file tree
Hide file tree
Showing 14 changed files with 3,534 additions and 48 deletions.
21 changes: 21 additions & 0 deletions dialect/keyword.go
Original file line number Diff line number Diff line change
Expand Up @@ -375,3 +375,24 @@ func MatchKeyword(upperWord string) KeywordKind {
}
return kind
}

type DatabaseDriver string

const (
DatabaseDriverMySQL DatabaseDriver = "mysql"
DatabaseDriverPostgreSQL DatabaseDriver = "postgresql"
DatabaseDriverSQLite3 DatabaseDriver = "sqlite3"
)

func DataBaseKeywords(driver DatabaseDriver) []string {
switch driver {
case DatabaseDriverMySQL:
return mysql8Keyword
case DatabaseDriverPostgreSQL:
return postgresql13Keywords
case DatabaseDriverSQLite3:
return sqliteKeywords
default:
return sqliteKeywords
}
}
Loading

0 comments on commit 94a78f2

Please sign in to comment.