@@ -417,6 +417,18 @@ extern NSString *const YapDatabaseModifiedExternallyKey;
417417#pragma mark Defaults
418418// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
419419
420+ /* *
421+ * Allows you to configure the default values for new connections.
422+ *
423+ * When you create a connection via [database newConnection], that new connection will inherit
424+ * its initial configuration via the default values configured for the parent database.
425+ * Of course, the connection may then override these default configuration values, and configure itself as needed.
426+ *
427+ * Changing the default values only affects future connections that will be created.
428+ * It does not affect connections that have already been created.
429+ **/
430+ @property (atomic , readonly ) YapDatabaseConnectionConfig *connectionDefaults;
431+
420432/* *
421433 * Allows you to set the default objectCacheEnabled and objectCacheLimit for all new connections.
422434 *
@@ -430,12 +442,10 @@ extern NSString *const YapDatabaseModifiedExternallyKey;
430442 * The default defaultObjectCacheEnabled is YES.
431443 * The default defaultObjectCacheLimit is 250.
432444 *
433- * For more detailed documentation on these properties, see the YapDatabaseConnection header file.
434- * @see YapDatabaseConnection objectCacheEnabled
435- * @see YapDatabaseConnection objectCacheLimit
445+ * @deprecated Use `connectionDefaults` property instead.
436446**/
437- @property (atomic , assign , readwrite ) BOOL defaultObjectCacheEnabled;
438- @property (atomic , assign , readwrite ) NSUInteger defaultObjectCacheLimit;
447+ @property (atomic , assign , readwrite ) BOOL defaultObjectCacheEnabled __attribute ((deprecated)) ;
448+ @property (atomic , assign , readwrite ) NSUInteger defaultObjectCacheLimit __attribute ((deprecated)) ;
439449
440450/* *
441451 * Allows you to set the default metadataCacheEnabled and metadataCacheLimit for all new connections.
@@ -450,12 +460,10 @@ extern NSString *const YapDatabaseModifiedExternallyKey;
450460 * The default defaultMetadataCacheEnabled is YES.
451461 * The default defaultMetadataCacheLimit is 500.
452462 *
453- * For more detailed documentation on these properties, see the YapDatabaseConnection header file.
454- * @see YapDatabaseConnection metadataCacheEnabled
455- * @see YapDatabaseConnection metadataCacheLimit
463+ * @deprecated Use `connectionDefaults` property instead.
456464**/
457- @property (atomic , assign , readwrite ) BOOL defaultMetadataCacheEnabled;
458- @property (atomic , assign , readwrite ) NSUInteger defaultMetadataCacheLimit;
465+ @property (atomic , assign , readwrite ) BOOL defaultMetadataCacheEnabled __attribute ((deprecated)) ;
466+ @property (atomic , assign , readwrite ) NSUInteger defaultMetadataCacheLimit __attribute ((deprecated)) ;
459467
460468/* *
461469 * Allows you to set the default objectPolicy and metadataPolicy for all new connections.
@@ -469,13 +477,11 @@ extern NSString *const YapDatabaseModifiedExternallyKey;
469477 *
470478 * The default defaultObjectPolicy is YapDatabasePolicyContainment.
471479 * The default defaultMetadataPolicy is YapDatabasePolicyContainment.
472- *
473- * For more detailed documentation on these properties, see the YapDatabaseConnection header file.
474- * @see YapDatabaseConnection objectPolicy
475- * @see YapDatabaseConnection metadataPolicy
480+ *
481+ * @deprecated Use `connectionDefaults` property instead.
476482**/
477- @property (atomic , assign , readwrite ) YapDatabasePolicy defaultObjectPolicy;
478- @property (atomic , assign , readwrite ) YapDatabasePolicy defaultMetadataPolicy;
483+ @property (atomic , assign , readwrite ) YapDatabasePolicy defaultObjectPolicy __attribute ((deprecated)) ;
484+ @property (atomic , assign , readwrite ) YapDatabasePolicy defaultMetadataPolicy __attribute ((deprecated)) ;
479485
480486#if TARGET_OS_IOS || TARGET_OS_TV
481487/* *
@@ -490,10 +496,9 @@ extern NSString *const YapDatabaseModifiedExternallyKey;
490496 *
491497 * The default defaultAutoFlushMemoryFlags is YapDatabaseConnectionFlushMemoryFlags_All.
492498 *
493- * For more detailed documentation on these properties, see the YapDatabaseConnection header file.
494- * @see YapDatabaseConnection autoFlushMemoryFlags
499+ * @deprecated Use `connectionDefaults` property instead.
495500**/
496- @property (atomic , assign , readwrite ) YapDatabaseConnectionFlushMemoryFlags defaultAutoFlushMemoryFlags;
501+ @property (atomic , assign , readwrite ) YapDatabaseConnectionFlushMemoryFlags defaultAutoFlushMemoryFlags __attribute ((deprecated)) ;
497502#endif
498503
499504// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
0 commit comments