Skip to content

Commit b196ab3

Browse files
committed
Added refreshSchema to SqliteConnection, making it accessible in transactions.
1 parent 32477b1 commit b196ab3

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

packages/sqlite_async/lib/src/sqlite_connection.dart

+2
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@ abstract class SqliteConnection extends SqliteWriteContext {
130130

131131
Future<void> close();
132132

133+
Future<void> refreshSchema();
134+
133135
/// Returns true if the connection is closed
134136
@override
135137
bool get closed;

packages/sqlite_async/lib/src/sqlite_queries.dart

+1
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ mixin SqliteQueries implements SqliteWriteContext, SqliteConnection {
140140

141141
/// Ensures that all connections are aware of the latest schema changes applied (if any).
142142
/// Queries and watch calls can potentially use outdated schema information after a schema update.
143+
@override
143144
Future<void> refreshSchema() {
144145
return get("PRAGMA table_info('sqlite_master')");
145146
}

0 commit comments

Comments
 (0)