Giter Site home page Giter Site logo

nsfetchrequest-explain's Introduction

NSFetchRequest Superpowers

NSFetchRequest+Explain allows to debug NSFetchRequests and NSPredicates in visual way.

Featurelist:

  • Treelike description with pretty printing
  • Easy to use (just call explainXY on any result or object you like)
  • Easy to find problems
    • Can be used to identify objects not found by the fetchrequest
    • Find hot spots (parts of the predicate that create the most misses)
    • just better visualisation as the default description
    • Shows actual values not just miss or match
  • Find errors in the predicate (e.g. misstyped properties)
  • Easy debug options with commandline arguments

How to use it:

a) Call explain on any object you like

  • [NSPredicate explainWithObject:]

  • [NSPredicate explain]

  • [NSFetchRequest explainWithResult:]

  • [NSFetchRequest explainWithObject:]

  • [NSFetchRequest explain]

  • [NSManagedObjectContext explainFetchRequest: showIgnored:]

  • [NSManagedObjectContext explainFetchRequest:]

  • [NSArray explainWithPredicate:]

  • [NSSet explainWithPredicate:]

b) Use commandline options

Commandline

-ExplainFetchRequests YES

This will enable a method swizzling and print a description for every fetchrequest executed.

-ExplainFetchRequestsAggregateOnly YES

Only show aggregation not every element of the fetch result

-ExplainFetchRequestsFetchLimit 100

Only explain the number of objects (default: 100)

How does it look?

Aggregation

Deep Nesting

How do i use the awesome tree printing?

Look in NSObject+Explain.h it's very easy and there are some examples on how to use it for other purposes.

I hope you enjoy it

Florian Agsteiner Twitter: @_dvplr

nsfetchrequest-explain's People

Contributors

scriptease avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.