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
which would combine what NewStore > Open do right now. We may even want to rename Session to DbSession for clarity, or renamed Open to CreateDbSession.
One drawback of this API, is that we may want to add a way to verify that the database is well formed (e.g. all tables are present, all indexes are created with proper name), which this somewhat limits. An approach would be to add CheckDb(conn) error and let callers invoke this upon startup (if they so choose).
Of note, what we have now is no better, because when DbStore is created, we are not given a connection to the database, so would be impossible to do any validation.
The text was updated successfully, but these errors were encountered:
Right now, the
Session
is the concrete object which provides "database storage" functionality. We even document it in the codeOne suggestion would be to get rid of the
DbStore
struct, removeNewStore
, and instead havewhich would combine what
NewStore > Open
do right now. We may even want to renameSession
toDbSession
for clarity, or renamedOpen
toCreateDbSession
.One drawback of this API, is that we may want to add a way to verify that the database is well formed (e.g. all tables are present, all indexes are created with proper name), which this somewhat limits. An approach would be to add
CheckDb(conn) error
and let callers invoke this upon startup (if they so choose).Of note, what we have now is no better, because when
DbStore
is created, we are not given a connection to the database, so would be impossible to do any validation.The text was updated successfully, but these errors were encountered: