All Projects → PoissonBallon → Easyrealm

PoissonBallon / Easyrealm

Licence: mit
EasyRealm is a micro-framework that helps you use Realm.

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Easyrealm

Orsserialport
Serial port library for Objective-C and Swift macOS apps
Stars: ✭ 609 (+90.31%)
Mutual labels:  framework, cocoapods
Loadingshimmer
An easy way to add a shimmering effect to any view with just one line of code. It is useful as an unobtrusive loading indicator.
Stars: ✭ 1,180 (+268.75%)
Mutual labels:  framework, cocoapods
Taniwhatextfield
My first cocoapod framework
Stars: ✭ 26 (-91.87%)
Mutual labels:  framework, cocoapods
Gzipswift
Swift framework that enables gzip/gunzip Data using zlib
Stars: ✭ 356 (+11.25%)
Mutual labels:  framework, cocoapods
Habitica Ios
Native iOS app for Habitica
Stars: ✭ 324 (+1.25%)
Mutual labels:  realm, cocoapods
Swiftframeworktemplate
A template for new Swift iOS / macOS / tvOS / watchOS Framework project ready with travis-ci, cocoapods, Carthage, SwiftPM and a Readme file
Stars: ✭ 527 (+64.69%)
Mutual labels:  framework, cocoapods
Keyboardhidemanager
Codeless manager to hide keyboard by tapping on views for iOS written in Swift
Stars: ✭ 57 (-82.19%)
Mutual labels:  framework, cocoapods
Shadowview
An iOS Library that makes shadows management easy on UIView.
Stars: ✭ 391 (+22.19%)
Mutual labels:  framework, cocoapods
Criollo
A powerful Cocoa web framework and HTTP server for macOS, iOS and tvOS.
Stars: ✭ 229 (-28.44%)
Mutual labels:  framework, cocoapods
Buymeacoffee
Buy Me a Coffee framework for iOS
Stars: ✭ 145 (-54.69%)
Mutual labels:  framework, cocoapods
Swiftyonboard
A swifty iOS framework that allows developers to create beautiful onboarding experiences.
Stars: ✭ 952 (+197.5%)
Mutual labels:  framework, cocoapods
Nearbyweather
NearbyWeather is an open source weather app for iOS, which uses the OpenWeatherMap API. With this project developers are invited to learn advanced iOS concepts, as well as to contribute further advancements. Fork this repo to get started.
Stars: ✭ 146 (-54.37%)
Mutual labels:  realm, cocoapods
Mbpopup
macOS status bar popups done right 😎
Stars: ✭ 89 (-72.19%)
Mutual labels:  framework, cocoapods
Predicateflow
Write amazing, strong-typed and easy-to-read NSPredicate.
Stars: ✭ 98 (-69.37%)
Mutual labels:  realm, cocoapods
Clue
Flexible bug report framework for iOS
Stars: ✭ 278 (-13.12%)
Mutual labels:  framework, cocoapods
Gradientprogressbar
📊 A customizable gradient progress bar (UIProgressView).
Stars: ✭ 311 (-2.81%)
Mutual labels:  cocoapods
Microfeatures Guidelines
📦📝 uFeatures guidelines
Stars: ✭ 315 (-1.56%)
Mutual labels:  cocoapods
Phonk
PHONK is a self-contained creative scripting toolbox for new and old Android Devices
Stars: ✭ 310 (-3.12%)
Mutual labels:  framework
Cellmesh
Game server framework based on cellnet
Stars: ✭ 310 (-3.12%)
Mutual labels:  framework
Vuefront
VueFront Core. Turn your old-fashioned CMS website in to a SPA & PWA in 5 minutes
Stars: ✭ 316 (-1.25%)
Mutual labels:  framework

EasyRealm

Version Carthage compatible Platform Build Status Swift 4.2 codecov License

EasyRealm is a micro-framework (less than 200 LOC) that helps you use Realm.

Versions guides

Swift Realm EasyRealm
3.0 >= 2.4 2.0.1
3.2 / 4.0 >= 3.1.0 >= 3.0.0
4.2 >= 3.10 >= 3.4.0

Keys Features

EasyRealm import many features as :

  • Deep cascade deleting
  • Deep unmanaged object
  • Get managed object from unmanaged object.
  • Multithread Action (save / edit / delete / query)

Promise

EasyRealm make 4 promises :

  • EasyRealm never transform secretly an unmanaged Object to a managed Object and vice-versa.
  • EasyRealm let you use managed and unmanaged objects identically.
  • EasyRealm never manipulate thread behind your back, you keep full control of your process flow.
  • EasyRealm never handle Error for you.

Examples

Using

  • No inheritance.
  • No protocol.
  • Import Framework
  • Enjoy

Save

To save an object :

let pokemon = Pokemon()
try pokemon.er.save(update: true)
//OR
let managed = try pokemon.er.saved(update: true)

Edit

To edit an object :

let pokemon = Pokemon()

try pokemon.er.edit {
  $0.level = 42
}

Delete

To delete an object :

let pokemon = Pokemon(name: "Pikachu")

try pokemon.er.delete()
//or
try pokemon.er.delete(with: .simple)
//or
try pokemon.er.delete(with: .cascade)

To delete all objects :

try Pokemon.er.deleteAll()

Queries

To query all objects of one type :

let pokemons = try Pokemon.er.all()

To query one object by its primaryKey :

let pokemon = Pokemon.er.fromRealm(with: "Pikachu")

Helping Variables

  • isManaged :
pokemon.er.isManaged // Return true if realm != nil and return false if realm == nil
  • managed :
pokemon.er.managed // Return the managed version of the object if one exist in Realm Database
  • unmanaged :
pokemon.er.unmanaged // Return an unmanaged version of the object

Installation

EasyRealm is available through CocoaPods. To install it, simply add the following line to your Podfile:

CocoaPods

use_frameworks!
pod "EasyRealm", '~> 3.2.0'

Carthage

github 'PoissonBallon/EasyRealm'

Author

License

EasyRealm is available under the MIT license. See the LICENSE file for more info.

Other

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].