I'm struggling to create a query in Swift and I'm not sure if this is due to a bug or a lack of understanding of how to create a query.
I've added the YapDatabase extension detailed in the YapDatabaseQuery header and I've tried:
var query: YapDatabaseQuery = YapDatabaseQuery(format: "WHERE authToken IS NOT NULL", arguments:nil)
this gives the error:
Cannot find an initializer for type 'YapDatabaseQuery' that accepts an argument list of type '(format: String, arguments: nil)'
I assumed this was because arguments need to be Objective-C types according to the header, so I then tried this:
var query: YapDatabaseQuery = YapDatabaseQuery(format: "WHERE authToken ?", arguments:NSString(string: "IS NOT NULL"))
But I still get an error even with passing an NSString:
Cannot find an initializer for type 'YapDatabaseQuery' that accepts an argument list of type '(format: String, arguments: NSString)'
I'm struggling to create a query in Swift and I'm not sure if this is due to a bug or a lack of understanding of how to create a query.
I've added the YapDatabase extension detailed in the YapDatabaseQuery header and I've tried:
this gives the error:
I assumed this was because arguments need to be Objective-C types according to the header, so I then tried this:
But I still get an error even with passing an NSString: