This repository was archived by the owner on Jan 3, 2021. It is now read-only.
Description I'm trying to figure out how to use Meow 2.0.2. By now I figured out how to save but I'm totally lost regarding the Queries.
class Test : Model {
var _id = IdObject ( )
var symbol : Symbol
}
class Symbol : Codable {
var name : String
var number : Int
}
With this setup I'm trying to find documents by name or number (or even both).
let context = manager? . makeContext ( )
let query : Query = " symbol.name " == " Test "
let result = try ? context? . findOne ( Test . self, where: query) . wait ( )
Or trying to have name on toplevel:
class Test : Model {
var _id = IdObject ( )
var name : String
}
let context = manager? . makeContext ( )
let query : Query = " name " == " Test "
let result = try ? context? . findOne ( Test . self, where: query) . wait ( )
All of these result in nil. I've also tried to create the corresponding syntax:
[
" name " : [
" $eq " :
" Test "
]
]
Which also didn't work. So I'm wondering... what is the correct way to query for documents in Meow 2.0?
I would be willing to help and write some docs, but I'd need to know how to use Meow first :D
Reactions are currently unavailable
I'm trying to figure out how to use Meow 2.0.2. By now I figured out how to save but I'm totally lost regarding the Queries.
With this setup I'm trying to find documents by name or number (or even both).
Or trying to have
nameon toplevel:All of these result in
nil. I've also tried to create the corresponding syntax:Which also didn't work. So I'm wondering... what is the correct way to query for documents in Meow 2.0?
I would be willing to help and write some docs, but I'd need to know how to use Meow first :D