drift.sqlite_keywords library

Provides utilities around sql keywords, like optional escaping etc.

Constants

additionalMariaDBKeywords → const Set<String>
A set of keywords that need to be escaped on mariadb and aren't contained in baseKeywords.
<String>{'ACCESSIBLE', 'ASENSITIVE', 'AUTO_INCREMENT', 'BIGINT', 'BINARY', 'BLOB', 'BOTH', 'CALL', 'CHANGE', 'CHAR'…
additionalPostgresKeywords → const Set<String>
A set of keywords that need to be escaped on postgres and aren't contained in baseKeywords.
<String>{'ANY', 'ARRAY', 'ASYMMETRIC', 'BINARY', 'BOTH', 'CURRENT_USER', 'ILIKE', 'LEADING', 'LOCALTIME', 'LOCALTIMEST…
additionalSqliteKeywords → const Set<String>
A set of keywords that need to be escaped on sqlite and aren't contained in baseKeywords.
<String>{}
baseKeywords → const Set<String>
A set of SQL keywords.
{'ADD', 'ABORT', 'ACTION', 'AFTER', 'ALL', 'ALTER', 'ALWAYS', 'ANALYZE', 'AND', 'AS', 'ASC', 'ATTACH', &…
sqliteKeywords → const Set<String>
Contains a set of all sqlite keywords, according to https://www.sqlite.org/lang_keywords.html. Drift will use this list to escape keywords.
baseKeywords

Functions

escapeIfNeeded(String s, [SqlDialect dialect = SqlDialect.sqlite]) String
Escapes s by wrapping it in backticks if it's an sqlite keyword.
isSqliteKeyword(String s) bool
Returns whether s is an sql keyword by comparing it to the sqliteKeywords.