fix(redis): disable SQL formatting for Redis queries
This commit is contained in:
1 parent
894ecdec42
commit
a535cf8f51
5 files changed
+58
-4
No files matched your search
+2
-1
@@ -11,7 +11,8 @@ describe("sqlFormatter", () => {
|
||||
expect(sqlFormatterSource).not.toContain("(?<=");
|
||||
});
|
||||
|
||||
it("disables SQL formatting for VictoriaMetrics queries", () => {
|
||||
it("disables SQL formatting for Redis and VictoriaMetrics queries", () => {
|
||||
expect(canFormatSqlForDatabaseType("redis")).toBe(false);
|
||||
expect(canFormatSqlForDatabaseType("victoriametrics")).toBe(false);
|
||||
expect(canFormatSqlForDatabaseType("mysql")).toBe(true);
|
||||
});
|
||||
|
||||
@@ -27,7 +27,7 @@ function resolveClickHouseIdentifierSafeDialect(sqlFormatter: SqlFormatterModule
|
||||
}
|
||||
|
||||
export function canFormatSqlForDatabaseType(dbType: string | null | undefined): boolean {
|
||||
return dbType !== "victoriametrics";
|
||||
return dbType !== "redis" && dbType !== "victoriametrics";
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user