Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Alecrim/AlecrimCoreData
Core Data made simple.
https://github.com/Alecrim/AlecrimCoreData
coredata swift
Last synced: 8 days ago
JSON representation
Core Data made simple.
- Host: GitHub
- URL: https://github.com/Alecrim/AlecrimCoreData
- Owner: Alecrim
- License: mit
- Archived: true
- Created: 2014-08-03T19:44:44.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2020-02-11T21:49:40.000Z (almost 5 years ago)
- Last Synced: 2024-11-30T21:42:27.425Z (11 days ago)
- Topics: coredata, swift
- Language: Swift
- Homepage:
- Size: 14.8 MB
- Stars: 779
- Watchers: 26
- Forks: 100
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ios - AlecrimCoreData - A powerful and simple Core Data wrapper framework written in Swift. (Core Data / Linter)
- awesome-swift - AlecrimCoreData - A simple Core Data wrapper library written in Swift. (Extensions)
- awesome-swift - AlecrimCoreData - Simple Core Data wrapper library. (Libs / Data Management)
- awesome-ios-star - AlecrimCoreData - A powerful and simple Core Data wrapper framework written in Swift. (Core Data / Linter)
- awesome-swift-cn - AlecrimCoreData - a simple CoreData wrapper library written in Swift. (Libs / Data Management)
- fucking-awesome-ios - AlecrimCoreData - A powerful and simple Core Data wrapper framework written in Swift. (Core Data / Linter)
- fucking-awesome-ios - AlecrimCoreData - A powerful and simple Core Data wrapper framework written in Swift. (Core Data / Linter)
- awesome-swift - AlecrimCoreData - Core Data made simple. (Data Management [🔝](#readme))
README
![AlecrimCoreData](https://raw.githubusercontent.com/Alecrim/AlecrimCoreData/master/AlecrimCoreData.png)
[![Version](https://img.shields.io/badge/v7.0%20beta%201-blue.svg?label=version&style=flat)](https://github.com/Alecrim/AlecrimCoreData)
[![Language: swift](https://img.shields.io/badge/swift-v5.0-blue.svg?style=flat)](https://developer.apple.com/swift/)
[![Platforms](https://img.shields.io/badge/platforms-macOS%2C%20iOS%2C%20watchOS%2C%20tvOS-blue.svg?style=flat)](http://cocoadocs.org/docsets/AlecrimCoreData)
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg?style=flat)](https://raw.githubusercontent.com/Alecrim/AlecrimCoreData/develop/LICENSE)
[![Author: Vanderlei Martinelli](https://img.shields.io/badge/author-Vanderlei%20Martinelli-blue.svg?style=flat)](https://www.linkedin.com/in/vmartinelli)A powerful and elegant Core Data framework for Swift.
## Usage
### Beta version. New docs soon...
Simple do that:
```swift
let query = persistentContainer.viewContext.people
.where { \.city == "Piracicaba" }
.orderBy { \.name }for person in query.dropFirst(20).prefix(10) {
print(person.name, person.address)
}
```Or that:
```swift
persistentContainer.performBackgroundTask { context in
let query = context.people
.filtered(using: \.country == "Brazil" && \.isContributor == true)
.sorted(by: .descending(\.contributionCount))
.sorted(by: \.name)if let person = query.first() {
print(person.name, person.email)
}
}
```After that:
```swift
import AlecrimCoreDataextension ManagedObjectContext {
var people: Query { return Query(in: self) }
}let persistentContainer = PersistentContainer()
```
And after your have created your matching managed object model in Xcode, of course. ;-)## Contribute
If you have any problems or need more information, please open an issue using the provided GitHub link.You can also contribute by fixing errors or creating new features. When doing this, please submit your pull requests to this repository as I do not have much time to "hunt" forks for not submitted patches.
- master - The production branch. Clone or fork this repository for the latest copy.
- develop - The active development branch. [Pull requests](https://help.github.com/articles/creating-a-pull-request) should be directed to this branch.## Contact the author
- [Vanderlei Martinelli](https://www.linkedin.com/in/vmartinelli)## License
**AlecrimCoreData** is released under an MIT license. See LICENSE for more information.