You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have written a lot of SQL queries as plain strings, especially in the new FeedStrategy subclasses. These queries are sometimes easier to read for those familiar with SQL, but there is no good way to compose strings of SQL, so we have ended up with a lot of duplicate code. This makes database changes (like adding a column to the message table) very expensive and error prone. It's also caused us to need ugly workarounds to namespace tables, for instance in Message+ViewDatabase.swift.
Let's refactor our raw strings to use SQLite.swift commands. This will increase code reuse and allow us to write new queries faster in the future. There may be a few edge cases where SQLite.swift doesn't have an API for some advanced SQL features. In those cases it's ok to stick with raw SQL and db.execute().
The text was updated successfully, but these errors were encountered:
We have written a lot of SQL queries as plain strings, especially in the new FeedStrategy subclasses. These queries are sometimes easier to read for those familiar with SQL, but there is no good way to compose strings of SQL, so we have ended up with a lot of duplicate code. This makes database changes (like adding a column to the message table) very expensive and error prone. It's also caused us to need ugly workarounds to namespace tables, for instance in
Message+ViewDatabase.swift
.Let's refactor our raw strings to use SQLite.swift commands. This will increase code reuse and allow us to write new queries faster in the future. There may be a few edge cases where SQLite.swift doesn't have an API for some advanced SQL features. In those cases it's ok to stick with raw SQL and
db.execute()
.The text was updated successfully, but these errors were encountered: