You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Discovered during systematic SQL function testing against SeaTable 6.1.8:
- #32: SQL INSERT via api-gateway returns "base not found" (Medium)
UPDATE/DELETE work, only INSERT fails through the same endpoint.
- #33: SQL JOIN results ignore convert_keys: true (Low)
JOIN results use internal column key IDs instead of column names.
- #34: SQL constants pi/e not recognized standalone (Low)
Work inside functions but not as standalone SELECT expressions.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
**Assessment:** Not necessarily a bug. If the scheduler is an optional component, the endpoints should return `503 Service Unavailable` or a clear error message instead of `406`.
60
63
64
+
### 32. SQL INSERT via api-gateway returns "base not found"
65
+
66
+
**Severity:** Medium — SQL INSERT broken via api-gateway
67
+
68
+
`POST /api-gateway/api/v2/dtables/{base_uuid}/sql/` with an `INSERT INTO` statement returns `400` with `{"error_message": "base {uuid} not found: insert on non-existent base"}`, even though the base exists and is accessible.
69
+
70
+
`UPDATE` and `DELETE` statements work correctly through the same endpoint. Only `INSERT` fails. A preceding `SELECT` on the same base does not resolve the issue.
71
+
72
+
```
73
+
SQL: INSERT INTO `table` (`col`) VALUES ('value')
74
+
Result: 400 — "base {uuid} not found: insert on non-existent base"
75
+
```
76
+
77
+
**Tested on:** SeaTable 6.1.8
78
+
79
+
**Recommendation:** Fix INSERT handling in the api-gateway to match UPDATE/DELETE behavior.
When executing an implicit JOIN query via `POST /api-gateway/api/v2/dtables/{base_uuid}/sql/` with `convert_keys: true`, the result rows use internal column key IDs (e.g., `rLfY`, `kz15`) instead of column names. For non-JOIN SELECT queries, `convert_keys: true` correctly returns column names as keys.
86
+
87
+
```
88
+
Query: SELECT `orders`.`product`, `customers`.`name` FROM `orders`, `customers` WHERE ...
The column names are available in the response `metadata` array, so callers can manually map keys to names. But this is an inconsistency with non-JOIN queries where `convert_keys` works as expected.
93
+
94
+
**Recommendation:** Apply `convert_keys` mapping to JOIN result rows, consistent with non-JOIN queries.
95
+
96
+
### 34. SQL constants `pi` and `e` not recognized as standalone expressions
97
+
98
+
**Severity:** Low — parser limitation
99
+
100
+
The documented constants `pi` and `e` work correctly as function arguments (e.g., `SELECT multiply(pi, 2)` returns `6.28...`), but fail when used as standalone SELECT expressions. The parser interprets them as column names.
101
+
102
+
```
103
+
SELECT pi FROM `table` → 400: "no such column: pi"
104
+
SELECT multiply(pi, 2) FROM `table` → 200: 6.28318...
105
+
```
106
+
107
+
**Assessment:** Edge case with a simple workaround. Document that constants must be used inside function calls.
0 commit comments