LevelDB, RocksDB and BoltDB support

未关闭
#2,515 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
冷清
技术栈
swift
领域
databases

调研方向

Start by locating the registry plugin architecture and reading how existing database integrations are organized. Then assess support for reading LevelDB and RocksDB directories, read-only access by default, byte-oriented key/value views, prefix filtering and range scans, and RocksDB column families. Done means these requirements are covered; the issue names no files or tests, so identify the relevant entry points and validation approach in the project first.

由索引模型根据 Issue 内容生成。

描述

enhancement platform-macos
Problem

None of the embedded key-value stores LevelDB, RocksDB and BoltDB is supported, so inspecting an application's local data means writing a throwaway program. They run in-process with no server, so the only way in is to open the files, the way TablePro opens a SQLite file today. Folds in #524.

Proposed solution

A registry plugin that opens a local store:

  • Point at a LevelDB or RocksDB directory, or a BoltDB file. Read-only by default, since these formats hold a single-process lock and opening one under a running app is unsafe. When another process holds the lock, say so plainly instead of waiting on it.
  • Keys and values in the grid, with a hex and a text view, since all three stores are byte-oriented.
  • Prefix filtering and range scans, since there is no query language to fall back on.
  • The sidebar shows column families for RocksDB and buckets, nested ones included, for BoltDB. LevelDB has one flat keyspace.

Reading the files

  • LevelDB and RocksDB: link their C APIs as static libraries published through apple/Libs/, or read the on-disk format (sorted table files, the manifest and the write-ahead log, with their compression) in Swift. The C APIs are the smaller risk.
  • BoltDB (bbolt, which etcd uses) is Go only, with no C library, but its file is one B+tree of fixed-size pages, small enough to read in Swift.

Open question

Whether writes ever come after the read-only version, and for which store first.

Alternatives considered

A throwaway script per inspection.

Platform

macOS

Related database type

N/A / General

主要语言
Swift
星标
6.2k
派生
412
平均合并
3 小时 56 分钟
30 天内合并 PR
669

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

TableProApp/TablePro 的其他 Issue

查看 TableProApp/TablePro 的全部 Issue

相似的 Issue

更多 Swift Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。