File tree Expand file tree Collapse file tree
packages/data/app_database/lib/src/connection Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ DatabaseConnection createAppDatabaseConnection(
99 String name, {
1010 bool logStatements = false ,
1111 bool isWalEnabled = true ,
12- int ? busyTimeoutMilliseconds = 5000 ,
12+ int busyTimeoutMs = 5000 ,
1313}) {
1414 return DatabaseConnection .delayed (
1515 Future .sync (() async {
@@ -26,8 +26,8 @@ DatabaseConnection createAppDatabaseConnection(
2626 }
2727
2828 // Sets a timeout (in milliseconds) for waiting when the database is locked.
29- if (busyTimeoutMilliseconds != null ) {
30- database.execute ('PRAGMA busy_timeout=$busyTimeoutMilliseconds ;' );
29+ if (busyTimeoutMs >= 0 ) {
30+ database.execute ('PRAGMA busy_timeout=$busyTimeoutMs ;' );
3131 }
3232 },
3333 );
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ DatabaseConnection createAppDatabaseConnection(
55 String name, {
66 bool logStatements = false ,
77 bool isWalEnabled = true ,
8- int ? busyTimeoutMilliseconds = 5000 ,
8+ int ? busyTimeoutMs = 5000 ,
99}) {
1010 throw UnsupportedError ('No suitable database connection implementation was found on this platform.' );
1111}
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ DatabaseConnection createAppDatabaseConnection(
1010 bool isWalEnabled = true ,
1111
1212 /// Ignored on Web; provided for API compatibility with native platforms.
13- int ? busyTimeoutMilliseconds = 5000 ,
13+ int ? busyTimeoutMs = 5000 ,
1414}) {
1515 assert (path == null || path.isEmpty, 'path is not supported on web' );
1616
You can’t perform that action at this time.
0 commit comments