yapstudios/YapDatabase
yapstudios/YapDatabase has 3,326 GitHub stars and 369 forks. GitHot measured 0 stars in 24 hours and -1 in 7 days. Last checked 2026-11-12 11:48 UTC. Last push 2022-09-07.
YapDB is a collection/key/value store with a plugin architecture. It's built atop sqlite, for Swift & objective-c developers.
实测星标增长
- 24小时
- 0
- 7天
- -1
- 15天
- 正在收集历史
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文YapDatabase is a collection/key/value store and so much more. It's built atop sqlite, for Swift & Objective-C developers, targeting macOS, iOS, tvOS & watchOS.
Hello World:
// Create and/or Open the database file
let db = YapDatabase()
// Configure database:
// We're going to store String's in the collection "test".
// To store custom classes/structs, just implement Swift's Codable protocol.
db.registerCodableSerialization(String.self, forCollection: "test")
// Get a connection to the database
// (You can have multiple connections for concurrency.)
let connection = db.newConnection()
// Write an item to the database
connection.readWrite {(transaction) in
transaction.setObject("hello", forKey: "world", inCollection: "test")
}
// Read it back
connection.read {(transaction) in
let str = transaction.object(forKey: "world", inCollection: "test") as? String
// str == "hello"
}
YapDB has the following features:
- Concurrency. You can read from the database while another thread is simultaneously making modifications to the database. So you never have to worry about blocking the main thread, and you can easily write to the database on a background thread. And, of course, you can read from the database on multiple threads simultaneously.
- Built-In Caching. A configurable object cache is built-in. Of course sqlite has caching too. But it's caching raw serialized bytes, and we're dealing with objects. So having a built-in cache means you can skip the deserialization process, and get your objects much faster.
- Metadata. Ever wanted to store extra data along with your object? Like maybe a timestamp of when it was downloaded. Or a fully separate but related object? You're in luck. Metadata support comes standard. Along with its own separate configurable cache too!
- Views. Need to filter, group & sort your data? No problem. YapDatabase comes with Views. And you don't even need to write esoteric SQL queries. Views work using closures, so you just provide a bit of native code. Plus they automatically update themselves, and they make animating tables super easy.
- Secondary Indexing. Speed up your queries by indexing important properties. And then use SQL style queries to quickly find your items.
- Full Text Search. Built atop sqlite's FTS module (contributed by google), you can add extremely speedy searching to your app with minimal effort.
- Relationships. You can setup relationships between objects and even configure cascading delete rules.
- Hooks. Perform custom app-specific logic when certain events take place, such as an object being modified or deleted.
- Sync. Support for syncing with Apple's CloudKit is available out of the box. There's even a fully functioning example project that demonstrates writing a syncing Todo app.
- Extensions. More than just a key/value store, YapDatabase comes with an extensions architecture built-in. You can even create your own extensions.
- Performance. Fetch thousands of objects on the main thread without dropping a frame.
See what the API looks like in "hello world" for YapDatabase
Learn more by visiting the wiki
探索相关项目
Asabeneh/30-Days-Of-Python
30 Days of Python 编程挑战是一份循序渐进的指南,用于在 30 天内学习 Python 编程语言。这项挑战可能需要超过 100 天。请按自己的节奏进行。这些视频或许也有帮助:https://www.youtube.com/channel/UC7PNRuno1rzYPb1xLa4yktw
78,560 星标grafana/grafana
开放且可组合的可观测性与数据可视化平台。可对来自 Prometheus、Loki、Elasticsearch、InfluxDB、Postgres 等众多数据源的指标、日志和追踪进行可视化。
77,830 星标redis/redis
对于正在构建实时数据驱动应用的开发者而言,Redis 是首选、速度最快且功能最丰富的缓存、数据结构服务器和文档与向量查询引擎。
77,395 星标apache/superset
Apache Superset 是一个数据可视化与数据探索平台
75,473 星标