MCPcopy Create free account
hub / github.com/ajitpratap0/GoSQLX / addKeywordsWithCategory

Method addKeywordsWithCategory

pkg/sql/keywords/keywords.go:293–309  ·  view source on GitHub ↗
(keywords []Keyword)

Source from the content-addressed store, hash-verified

291}
292
293func (k *Keywords) addKeywordsWithCategory(keywords []Keyword) {
294 for _, kw := range keywords {
295 if !k.containsKeyword(kw.Word) {
296 if k.ignoreCase {
297 k.keywordMap[strings.ToUpper(kw.Word)] = kw
298 if kw.Reserved {
299 k.reservedKeywords[strings.ToUpper(kw.Word)] = true
300 }
301 } else {
302 k.keywordMap[kw.Word] = kw
303 if kw.Reserved {
304 k.reservedKeywords[kw.Word] = true
305 }
306 }
307 }
308 }
309}
310
311// containsKeyword checks if a keyword already exists in the collection
312func (k *Keywords) containsKeyword(word string) bool {

Calls 1

containsKeywordMethod · 0.95