Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Add InMemoryViewContext - #27

Merged
colemancda merged 6 commits into
masterfrom
feature/in-memory-store
Jul 23, 2026
Merged

colemancda merged 6 commits into
masterfrom
feature/in-memory-store

Conversation

@colemancda

Copy link
Copy Markdown
Member

Adds InMemoryViewContext, a synchronous, @MainActor implementation of the ViewContext protocol backed entirely by memory.

It mirrors InMemoryModelStorage but exposes the synchronous read API (fetch/fetchID/count) plus insert/delete/register for populating the context — evaluating fetch requests with the same pure Swift filtering engine. Intended for SwiftUI previews, unit tests, and lightweight main-thread caches where the async store is inconvenient. Unavailable under Embedded Swift, matching ViewContext itself.

Includes InMemoryViewContextTests covering insert/update/fetch, predicates, sorting, paging, deletes, relationship predicates, custom functions, and schema validation.

@github-code-quality

Copy link
Copy Markdown

Code Coverage Overview

Languages: Swift

Swift / code-coverage/llvm-cov

The overall coverage in commit f0ff881 in the feature/in-memory-st... branch remains at 96%, unchanged from commit 790cfe9 in the master branch.

Show a code coverage summary of the most impacted files.
File master 790cfe9 feature/in-memory-st... f0ff881 +/-
Sources/CoreMod...ewContext.swift 0% 100% +100%

@colemancda
colemancda merged commit 9f9bfe7 into master Jul 23, 2026
28 of 32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant