File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -296,9 +296,30 @@ Settings in `package.json` → `contributes.configuration`:
296296| ---------| ---------| -------------|
297297| ` sqliteExplorer.maxFileSize ` | 200 | Max file size in MB (0 = unlimited) |
298298| ` sqliteExplorer.maxRows ` | 0 | Max rows to display (0 = unlimited) |
299- | ` sqliteExplorer.defaultPageSize ` | 1000 | Default page size for pagination |
299+ | ` sqliteExplorer.defaultPageSize ` | 500 | Default page size for pagination |
300300| ` sqliteExplorer.instantCommit ` | "never" | Auto-save strategy (always/never/remote-only) |
301301| ` sqliteExplorer.doubleClickBehavior ` | "inline" | Double-click action (inline/modal/vscode) |
302+ | ` sqliteExplorer.queryTimeout ` | 30000 | Query execution timeout in ms (prevents runaway queries) |
303+ | ` sqliteExplorer.maxUndoMemory ` | 52428800 | Max undo history memory in bytes (default 50MB) |
304+
305+ ## Gotchas
306+
307+ ### SQL Security
308+ - ** LIKE wildcards** : User input in LIKE queries must use ` escapeLikePattern() ` with ` ESCAPE '\\' ` clause
309+ - ** SQL types in DDL** : Always validate with ` validateSqlType() ` to prevent injection via malicious type strings
310+ - ** NUL bytes** : Strings containing ` \0 ` must be encoded as hex blobs in exported SQL
311+
312+ ### RPC Serialization
313+ - ** Uint8Array becomes ` {} ` ** : Never send raw Uint8Array via postMessage - use the marker format
314+ - ** Transfer for blobs** : Large binary data should use ` Transfer ` wrapper for zero-copy
315+
316+ ### Testing
317+ - ** VS Code mocks required** : Unit tests need ` tests/mocks/vscode.ts ` imported first
318+ - ** JSON patch tests** : Test behavior (merged result) not implementation (SQL function)
319+
320+ ### Build
321+ - ** WASM not found** : Run ` node scripts/build.mjs ` if ` assets/sqlite3.wasm ` is missing
322+ - ** Browser vs Node** : Check ` import.meta.env.VSCODE_BROWSER_EXT ` for environment-specific code
302323
303324## Extension Identifiers
304325
You can’t perform that action at this time.
0 commit comments