1
0
Fork 0
mirror of synced 2024-09-20 19:33:10 +12:00

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

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}\``
}
}