Make switch exhaustive.
This commit is contained in:
parent
481bf9a8b8
commit
669692e722
|
@ -44,7 +44,7 @@ const BASE_LIMIT = envLimit || 5000
|
||||||
|
|
||||||
// Takes a string like foo and returns a quoted string like [foo] for SQL Server
|
// Takes a string like foo and returns a quoted string like [foo] for SQL Server
|
||||||
// and "foo" for Postgres.
|
// and "foo" for Postgres.
|
||||||
function quote(client: SqlClient, str: string) {
|
function quote(client: SqlClient, str: string): string {
|
||||||
switch (client) {
|
switch (client) {
|
||||||
case SqlClient.SQL_LITE:
|
case SqlClient.SQL_LITE:
|
||||||
case SqlClient.ORACLE:
|
case SqlClient.ORACLE:
|
||||||
|
@ -52,7 +52,7 @@ function quote(client: SqlClient, str: string) {
|
||||||
return `"${str}"`
|
return `"${str}"`
|
||||||
case SqlClient.MS_SQL:
|
case SqlClient.MS_SQL:
|
||||||
return `[${str}]`
|
return `[${str}]`
|
||||||
default:
|
case SqlClient.MY_SQL:
|
||||||
return `\`${str}\``
|
return `\`${str}\``
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue