CSFrom

@objc
public final class CSFrom : NSObject

The CSFrom serves as the Objective-C bridging type for From.

See also

From
  • The associated NSManagedObject entity class

    Declaration

    Swift

    @objc
    public var entityClass: AnyClass { get }
  • The NSPersistentStore configuration names to associate objects from. May contain NSString instances to pertain to named configurations, or NSNull to pertain to the default configuration

    Declaration

    Swift

    @objc
    public var configurations: [Any]? { get }
  • Initializes a CSFrom clause with the specified entity class.

    MyPersonEntity *people = [transaction fetchAllFrom:CSFromClass([MyPersonEntity class])];
    

    Declaration

    Swift

    @objc
    public convenience init(entityClass: NSManagedObject.Type)

    Parameters

    entityClass

    the NSManagedObject class type to be created

  • Initializes a CSFrom clause with the specified configurations.

    MyPersonEntity *people = [transaction fetchAllFrom:
       CSFromClass([MyPersonEntity class], @"Config1")];
    

    Declaration

    Swift

    @objc
    public convenience init(entityClass: NSManagedObject.Type, configuration: Any)

    Parameters

    entityClass

    the associated NSManagedObject entity class

    configuration

    the NSPersistentStore configuration name to associate objects from. This parameter is required if multiple configurations contain the created NSManagedObject‘s entity type. Set to [NSNull null] to use the default configuration.

  • Initializes a CSFrom clause with the specified configurations.

    MyPersonEntity *people = [transaction fetchAllFrom:
       CSFromClass([MyPersonEntity class],
                    @[[NSNull null], @"Config1"])];
    

    Declaration

    Swift

    @objc
    public convenience init(entityClass: NSManagedObject.Type, configurations: [Any])

    Parameters

    entityClass

    the associated NSManagedObject entity class

    configurations

    an array of the NSPersistentStore configuration names to associate objects from. This parameter is required if multiple configurations contain the created NSManagedObject‘s entity type. Set to [NSNull null] to use the default configuration.