Skip to content

Commit

Permalink
Make userVersion and useInsertReturning constants
Browse files Browse the repository at this point in the history
Not quite sure whether it may make sense to set
userVersion?
If that becomes an issue, we can still generate
`nonisolated(unsafe)`.
  • Loading branch information
helje5 committed Apr 7, 2024
1 parent 0b13164 commit 3387585
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ extension EnlighterASTGenerator {

// Schema version

typeVariables.append(.var(
typeVariables.append(.let(
public: options.public, "userVersion",
is: .integer(database.userVersion),
comment: "User version of the database (`PRAGMA user_version`)."
Expand All @@ -84,7 +84,7 @@ extension EnlighterASTGenerator {

// Whether SQLite3 supports returning (the user can override!)

typeVariables.append(.var(
typeVariables.append(.let(
public: options.public, "useInsertReturning",
is: .cmp(
.call(name: "sqlite3_libversion_number"),
Expand Down

0 comments on commit 3387585

Please sign in to comment.