sqlite:// URL reads its query parameters as part of the file path

未關閉 適合新手
#4,389 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
2/5
預估耗時
1-3 小時
新手友好度
62/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
活躍
技術堆疊
macos, sqlite, swift
領域
databases

研究方向

沒有指明檔案,因此先透過 open 'sqlite:///path/to/shop.sqlite?name=Shop' 重現,並找出連線 URL 在何處被解析為檔案路徑和視窗標題。閱讀 sqlite://、duckdb:// 和 beancount:// 共用的檔案 URL 處理邏輯,因為據回報這三者行為相同,並檢查伺服器 URL 如何拆分查詢參數以便對比。完成意味著在使用路徑之前先分離查詢字串,檔案能夠開啟,並且標題是 name 參數,或在缺失時是檔案名稱。

由索引模型根據 Issue 內容生成。

描述

bug platform-macos
What happened?

Opening a sqlite:// URL with query parameters reads the parameters as part of the file path. sqlite:///path/to/shop.sqlite?name=Shop opens /path/to/shop.sqlite?name=Shop, a file that does not exist, so the driver creates an empty database under that name. The window title reads SQLite //path/to/shop.sqlite?name=Shop.

Without parameters the title is still SQLite //path/to/shop.sqlite. duckdb:// and beancount:// file URLs behave the same.

Steps to reproduce
  1. Run open 'sqlite:///path/to/shop.sqlite?name=Shop'.
  2. Click Connect.
  3. The window title shows SQLite //path/to/shop.sqlite?name=Shop and the sidebar shows an empty database.
Expected behavior

The URL's path is the file, and name and the other documented parameters apply the way they do on server URLs. The window is titled Shop, or the file name when the URL has no name, as when the file itself is opened.

Database type

SQLite

TablePro version

0.88.0-beta.2

Platform

macOS

主要語言
Swift
星號
6.2k
分支
412
平均合併
7 小時 38 分鐘
30 天內合併 PR
536

環境準備

這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

TableProApp/TablePro 的其他 Issue

查看 TableProApp/TablePro 的全部 Issue

相似的 Issue

更多 Swift Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。