After putting the EmojiJournal into the postgresql database, the filtering getAll function does not work anymore. When I try it with the OpenAPI, it returns with an internal server error (500).
Does it have something to do with the emoji symbol which is used for the queryparameter converted to utf-8 for the url address? If so, how can I fix this?
Thanks
@seabaylea Can you please help with this when you get a chance? Thank you - much appreciated! :]
Hi @hastoro11.
Do any of the other actions (save, delete) etc work with the database? It might also be worth checking that you can do a manual “get all” from the database using the following on the terminal:
psql -U postgres -d emojijournal -c 'SELECT * FROM "JournalEntrys"'
Which will return something like the following (for a successful fetch with no entries in the table):
id | emoji | date
----+-------+------
(0 rows)
Sure, it does work. It even works with the WHERE clause, when I can use the emoji symbol in the statement.
@hastoro11 do any of the other actions work through the OpenAPI UI? ie, is Kitura definitely connecting to the database successfully?
Yes, everything is working fine.
I keep fiddling with it, I rewrote it from scratch, but the issue is the same.
This is the error message what I get from SwiftKueryORM:
" 706 : QueryParameters found but failed construct database query"
If I ask for the entire collection from the Model, then filter it with the parameter everything works like a charm. That’s why I think it might be an encoding issue.
@hastoro11 Interesting. Can you raise an issue against the ORM here, and include the what you’re using in the QueryParameters?