ModelPath
open class ModelPath<ModelType> : PropertyContainerPath where ModelType : ModelRepresents the Model structure itself, a container of property references.
- Example:
“`swift
class PostModelPath : ModelPath{} 
extension ModelPath where ModelType == Post {
  var id: FieldPath
- 
                  
                  DeclarationSwift public init(name: String = "root", isCollection: Bool = false, parent: PropertyPath? = nil)
- 
                  
                  DeclarationSwift public func getMetadata() -> PropertyPathMetadata
- 
                  
                  DeclarationSwift public func getModelType() -> Model.Type
- 
                  
                  DeclarationSwift public func isRoot() -> Bool
- 
                  
                  DeclarationSwift public func id(_ name: String = "id") -> FieldPath<String>
- 
                  
                  DeclarationSwift public func string(_ name: String) -> FieldPath<String>
- 
                  
                  DeclarationSwift public func bool(_ name: String) -> FieldPath<Bool>
- 
                  
                  DeclarationSwift public func int(_ name: String) -> FieldPath<Int>
- 
                  
                  DeclarationSwift public func double(_ name: String) -> FieldPath<Double>
 View on GitHub
View on GitHub