feat(db): integrate DuckDB connection and create projects table#2
feat(db): integrate DuckDB connection and create projects table#2
Conversation
📝 WalkthroughSummary by CodeRabbit
WalkthroughThis update introduces a DuckDB-backed project metadata store to the backend, including database initialization, connection management, and schema setup. New API endpoints and handler logic for retrieving project metadata are added, along with corresponding tests. The frontend receives auto-imported TypeScript declarations for common Vue and Pinia APIs, and project-related files are now ignored in Changes
Sequence Diagram(s)sequenceDiagram
participant App as Backend App
participant DB as DuckDB (via db.ts)
participant SQL as SQL Schema File
participant API as Client/API Consumer
Note over App,DB: Startup
App->>DB: initializeDb()
DB->>SQL: Load create_projects_table.sql
DB->>DB: Create _meta_projects table if not exists
DB-->>App: Return DB connection
Note over API,App: Fetch all projects
API->>App: GET /project/
App->>DB: getDb()
App->>DB: SELECT * FROM _meta_projects ORDER BY created_at DESC
DB-->>App: Projects as JSON
App-->>API: { data: [...] }
sequenceDiagram
participant Test as Test Suite
participant DB as DuckDB (db.ts)
participant SQL as SQL Schema File
Test->>DB: initializeDb(':memory:')
DB->>SQL: Load create_projects_table.sql
DB->>DB: Create _meta_projects table
Test->>DB: getDb()
Test->>DB: Insert project (optional)
Test->>DB: Query projects
DB-->>Test: Project data
Test->>DB: closeDb()
DB-->>Test: Connection closed
📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (11)
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Join our Discord community for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
No description provided.