Sweep: Define interface for sql.js prepared statements#60
Conversation
- Defined `WasmPreparedStatement` interface matching sql.js API - Updated `WasmDatabaseInstance.prepare` to return `WasmPreparedStatement` - Refactored `WasmDatabaseEngine` methods (`fetchTableData`, `updateCellBatch`) to use the new interface - Added API coverage tests for `fetchTableData` and `updateCellBatch` Co-authored-by: zknpr <96851588+zknpr@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Merged as part of v1.3.0 release in PR #65 |
Acknowledged. Thank you for the update regarding the v1.3.0 release. |
This PR addresses a code health issue by replacing the unsafe
anyreturn type forprepare()insrc/core/sqlite-db.tswith a properWasmPreparedStatementinterface.Changes:
WasmPreparedStatementinterface with methodsrun,get,step,reset,free, andgetColumnNames.WasmDatabaseInstanceto useWasmPreparedStatement.WasmDatabaseEngineimplementation to handle the typed statement object, including proper handling ofget()return values (which can be undefined).tests/unit/api_coverage.test.tsto verify the behavior offetchTableDataandupdateCellBatchwhich rely on the prepared statement API.Verification:
npm run compilepasses.npm testpasses, including existing tests and the new API coverage tests.get()behavior aligns withsql.js(returns row array or undefined).PR created automatically by Jules for task 1782077784216029526 started by @zknpr