Skip to content

Commit

Permalink
FIx generic type
Browse files Browse the repository at this point in the history
  • Loading branch information
enums committed Jul 4, 2019
1 parent 83f8586 commit 3a99dc3
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions Source/Pjango/Model/PCModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -88,17 +88,8 @@ open class PCModel: PCObject, PCViewable {
open func initialObjects() -> [PCModel]? {
return nil
}


open class func queryObjects<T>(field: PCDataBaseField, likeValue value: PCModelDataBaseFieldType, useCache: Bool = true, ext: String = "") -> [T]? {
return queryObjects(ext: (useCache, "WHERE \(field.name) like '\(value)' \(ext)"))
}

open class func queryObjects<T>(field: PCDataBaseField, equalValue value: PCModelDataBaseFieldType, useCache: Bool = true, ext: String = "") -> [T]? {
return queryObjects(ext: (useCache, "WHERE \(field.name)='\(value)' \(ext)"))
}

open class func queryObjects<T>(ext: (useCache: Bool, param: String)? = nil) -> [T]? {
open class func queryObjects<T>(_ type: T.Type, ext: (useCache: Bool, param: String)? = nil) -> [T]? {
guard let meta = PjangoRuntime._pjango_runtime_models_name2meta[_pjango_core_class_name] else {
return nil
}
Expand Down

0 comments on commit 3a99dc3

Please sign in to comment.