Skip to content

Commit 3067075

Browse files
authored
feat(explorer): wrap table names in double quotes by default (#3588)
1 parent 3915759 commit 3067075

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@latticexyz/explorer": patch
3+
---
4+
5+
Table names in SQL queries are now automatically enclosed in double quotes by default, allowing support for special characters.

packages/explorer/src/app/(explorer)/[chainName]/worlds/[worldAddress]/explore/Explorer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export function Explorer() {
3333
setQuery(`SELECT * FROM "${tableName}";`);
3434
} else {
3535
const columns = Object.keys(table.schema).map((column) => `"${column}"`);
36-
setQuery(`SELECT ${columns.join(", ")} FROM ${tableName};`);
36+
setQuery(`SELECT ${columns.join(", ")} FROM "${tableName}";`);
3737
}
3838
}
3939
}, [chainId, setQuery, selectedTableId, table, worldAddress, prevSelectedTableId, query, indexer.type]);

0 commit comments

Comments
 (0)