Make switch exhaustive.

This commit is contained in:
Sam Rose 2024-07-18 11:41:37 +01:00
parent 481bf9a8b8
commit 669692e722
No known key found for this signature in database
1 changed files with 2 additions and 2 deletions

View File

@ -44,7 +44,7 @@ const BASE_LIMIT = envLimit || 5000
// Takes a string like foo and returns a quoted string like [foo] for SQL Server
// and "foo" for Postgres.
function quote(client: SqlClient, str: string) {
function quote(client: SqlClient, str: string): string {
switch (client) {
case SqlClient.SQL_LITE:
case SqlClient.ORACLE:
@ -52,7 +52,7 @@ function quote(client: SqlClient, str: string) {
return `"${str}"`
case SqlClient.MS_SQL:
return `[${str}]`
default:
case SqlClient.MY_SQL:
return `\`${str}\``
}
}