quattro_4 scribble

scribble 落書き (調べた事をただ落書きする)

MotionInMotion Episode 5 - CoreData with CDQ and ruby-xcdm

CoreData with CDQ and ruby-xcdm - MotionInMotion

ActiveRecordのようにCoreDataを扱う

  • Author @seriousken
    • co-founder of infiniteRed
  • cdq (CoreData Query)
  • Steps
    • setup
      • Gemfile gem 'cdq'
      • cdq init
    • schema and models
    • use
      • like active record
  • cdq syntax
    • Author.where(:name).eq("Emily")
    • where / limit / offset / first
    • eq / not_equal / gt / le / contains
    • and / or
  • AppDelegate
    • include CDQ
    • cdq.setup
  • schema/0001_initial.rb
    • schema "0001 initial" do
      • entity "Article" do
        • string :body, optional: false
        • string / integer32 / boolean / datetime / float
        • belongs_to / has_many
    • $ rake schema:build
      • Writing xcdatamodel
  • context
    • cdq.contexts.new(NSPrivateQueueConcurrencyType)
    • cdq.contexts.new(NSMainQueueConcurrencyType)
  • $ cdq create model post
  • ruby-xcdm
    • tool for generating the same xcdatamodeld files
  • fault state Core Data Programming Guide: Faulting and Uniquing
  • delegateの実装の仕方が気になった
    • Blapp/app/delegates/PostsControllerAlertViewDelegate.rb
      • module PostsControllerAlertViewDelegate
        • def alertView(alertView, didDismissWithButtonIndex:buttonIndex)
      • include PostsControllerAlertViewDelegate (PostsController < UITableViewController)

pseudonym - 偽名、仮名、ペンネーム、ハンドルネーム