Answer the question
In order to leave comments, you need to log in
How to solve a problem with SQLite in Swift?
Good afternoon. Can you please tell me how in the stephencelis/SQLite.swift library ( https://github.com/stephencelis/SQLite.swift ) it is possible to implement a calculated column from other columns in the select? Which can then be used when displaying data, as well as in order by? I tried several options, but always writes that this column was not found (because it was not saved in the database)
An example of what needs to be solved:
SELECT a+b as c from test ORDER BY c ASC;
I also encountered a problem in the like method in conjunction with LOWER (for comparison, case-insensitive), the problem is in comparing Russian characters, they are not converted to lowercase... Perhaps someone solved this problem?
Example:
// in name value: ПРИВЕТ from database
let search_name = "Привет"
user.filter(name.lowercaseString.like("%" + search_name.lowercased() + "%"))
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question