Core.Data.Updated.for.Swift.3.2016.12.pdf
Introduction
How This Book Approaches Core Data 9
A Note on Swift 11
Part 1
Core Data Basics
1 Hello Core Data
Core Data Architecture 16
Data Modeling 17
Setting Up the Stack 20
Showing the Data 22
Manipulating Data 30
Summary 36
Notes for Pre-iOS 10/macOS 10.12 37
2 Relationships
Adding More Entities 40
Subentities 43
Creating Relationships 46
Other Types of Relationships 48
Establishing Relationships 50
Relationships and Deletion 54
Adapting the User Interface 57
Summary 59
3 Data Types
Standard Data Types 61
Primitive Properties and Transient Attributes 63
Custom Data Types 64
Default Values and Optional Values 71
Summary 72
Part 2
Understanding Core Data
4 Accessing Data
Fetch Requests 76
Relationships 85
Other Ways to Retrieve Managed Objects 86
Memory Considerations 87
Summary 89
5 Changing and Saving Data
Change Tracking 92
Saving Changes 94
Batch Updates 99
Summary 101
6 Performance
Performance Characteristics of the Core Data Stack 104
Avoiding Fetch Requests 108
Optimizing Fetch Requests 116
Inserting and Changing Objects 123
How to Build Efficient Data Models 124
Strings and Text 128
Esoteric Tunables 128
Summary 128
Part 3
Concurrency and Syncing
7 Syncing with a Network Service
Organization and Setup 131
Syncing Architecture 133
Context Owner 134
Reacting to Local Changes 137
Reacting to Remote Changes 141
Change Processors 142
Deleting Local Objects 145
Groups and Saving Changes 146
Expanding the Sync Architecture 147
8 Working with Multiple Contexts
Concurrency Rules 152
Merging Changes 158
The Default Concurrent Setup 159
Setups with Multiple Coordinators 161
Setups with Nested Contexts 163
Complexity of Nested Contexts 167
Summary 172
9 Problems with Multiple Contexts
Save Conflicts and Merge Policies 175
Query Generations 181
Deleting Objects 183
Uniqueness Constraints 187
Summary 189
Part 4
Advanced Topics
10 Predicates
Simple Predicates 193
Creating Predicates in Code 195
Format Strings 195
Combining Predicates 199
Traversing Relationships 201
Matching Objects and Object IDs 203
Matching Strings 204
Transformable Values 206
Performance and Ordering Expressions 207
Summary 208
11 Text
The Complexity of Unicode 210
Searching 211
Sorting 215
Summary 220
12 Model Versions and Migrating Data
Model Versions 222
The Migration Process 225
Inferred Mapping Models 234
Custom Mapping Models 235
Migration and the UI 240
Testing Migrations 241
Summary 243
13 Pro????ling
SQL Debug Output 245
Core Data Instruments 252
Threading Guard 256
Summary 256
14 Relational Database Basics and SQL
An ded Database 259
Tables, Columns, and Rows 260
Architecture of the Database System 261
The Database Language SQL 264
Relationships 266
Transactions 269
Indexes 269
Journaling 270
Summary 271
资源链接
标签
发布日期
2017-05-26
擦亮日期
2017-05-26