package clickhouse

import "strings"

// https://clickhouse.com/docs/en/sql-reference/syntax#keywords
func (p *Parser) IsReservedKeyword(s string) bool {
	switch strings.ToLower(s) {
	case "add":
	case "after":
	case "alias":
	case "all":
	case "alter":
	case "and":
	case "anti":
	case "any":
	case "array":
	case "as":
	case "asc":
	case "asof":
	case "between":
	case "both":
	case "by":
	case "case":
	case "cast":
	case "check":
	case "cluster":
	case "collate":
	case "column":
	case "comment":
	case "constraint":
	case "create":
	case "cross":
	case "cube":
	case "database":
	case "databases":
	case "default":
	case "delete":
	case "desc":
	case "describe":
	case "detach":
	case "distinct":
	case "distributed":
	case "drop":
	case "else":
	case "end":
	case "engine":
	case "exists":
	case "explain":
	case "expression":
	case "extract":
	case "false":
	case "fetch":
	case "final":
	case "first":
	case "for":
	case "format":
	case "from":
	case "full":
	case "function":
	case "global":
	case "grant":
	case "group":
	case "having":
	case "if":
	case "ilike":
	case "in":
	case "index":
	case "inner":
	case "insert":
	case "interpolate":
	case "interval":
	case "into":
	case "is":
	case "join":
	case "key":
	case "kill":
	case "last":
	case "leading":
	case "left":
	case "like":
	case "limit":
	case "live":
	case "local":
	case "logs":
	case "materialized":
	case "modify":
	case "natural":
	case "not":
	case "null":
	case "nulls":
	case "offset":
	case "on":
	case "optimize":
	case "or":
	case "order":
	case "outer":
	case "outfile":
	case "over":
	case "partition":
	case "paste":
	case "populate":
	case "prewhere":
	case "primary":
	case "projection":
	case "rename":
	case "replace":
	case "right":
	case "rollup":
	case "sample":
	case "select":
	case "semi":
	case "set":
	case "settings":
	case "show":
	case "storage":
	case "substring":
	case "sync":
	case "system":
	case "table":
	case "tables":
	case "temporary":
	case "test":
	case "then":
	case "ties":
	case "to":
	case "top":
	case "totals":
	case "trailing":
	case "trim":
	case "true":
	case "truncate":
	case "ttl":
	case "type":
	case "union":
	case "update":
	case "use":
	case "using":
	case "uuid":
	case "values":
	case "view":
	case "watch":
	case "when":
	case "where":
	case "window":
	case "with":
	default:
		return false
	}
	return true
}
