diff --git a/iOS/Plugins/FlipperKitDatabasesPlugin/FlipperKitDatabasesPlugin/DatabaseDriver.h b/iOS/Plugins/FlipperKitDatabasesPlugin/FlipperKitDatabasesPlugin/DatabaseDriver.h index 140ba33872a..3976a9e4ea6 100644 --- a/iOS/Plugins/FlipperKitDatabasesPlugin/FlipperKitDatabasesPlugin/DatabaseDriver.h +++ b/iOS/Plugins/FlipperKitDatabasesPlugin/FlipperKitDatabasesPlugin/DatabaseDriver.h @@ -33,5 +33,8 @@ reverse:(BOOL)reverse start:(NSInteger)start count:(NSInteger)count; -- (DatabaseExecuteSqlResponse*)executeSQL:(NSString*)sql; +- (DatabaseExecuteSqlResponse*) + executeSQLWithDatabaseDescriptor: + (id)databaseDescriptor + sql:(NSString*)sql; @end diff --git a/iOS/Plugins/FlipperKitDatabasesPlugin/FlipperKitDatabasesPlugin/DatabasesManager.m b/iOS/Plugins/FlipperKitDatabasesPlugin/FlipperKitDatabasesPlugin/DatabasesManager.m index 40b2908f208..c6d167db968 100644 --- a/iOS/Plugins/FlipperKitDatabasesPlugin/FlipperKitDatabasesPlugin/DatabasesManager.m +++ b/iOS/Plugins/FlipperKitDatabasesPlugin/FlipperKitDatabasesPlugin/DatabasesManager.m @@ -213,7 +213,10 @@ - (void)listenForCommands { } @try { DatabaseExecuteSqlResponse* sqlResponse = - [descriptorHolder.databaseDriver executeSQL:request.value]; + [descriptorHolder.databaseDriver + executeSQLWithDatabaseDescriptor:descriptorHolder + .databaseDescriptor + sql:request.value]; NSDictionary* response = [ObjectMapper databaseExecuteSqlResponseToDictionary:sqlResponse]; [responder success:response]; diff --git a/iOS/Plugins/FlipperKitDatabasesPlugin/FlipperKitDatabasesPlugin/Mock/MockDatabaseDriver.m b/iOS/Plugins/FlipperKitDatabasesPlugin/FlipperKitDatabasesPlugin/Mock/MockDatabaseDriver.m index a13b601e5b8..f29e24b023c 100644 --- a/iOS/Plugins/FlipperKitDatabasesPlugin/FlipperKitDatabasesPlugin/Mock/MockDatabaseDriver.m +++ b/iOS/Plugins/FlipperKitDatabasesPlugin/FlipperKitDatabasesPlugin/Mock/MockDatabaseDriver.m @@ -91,7 +91,10 @@ @implementation MockDatabaseDriver total:numRows]; } -- (DatabaseExecuteSqlResponse*)executeSQL:(NSString*)sql { +- (DatabaseExecuteSqlResponse*) + executeSQLWithDatabaseDescriptor: + (id)databaseDescriptor + sql:(NSString*)sql { // Generate a mock response with a random type NSString* type; NSArray* columns = @[ @"id", @"name", @"age" ];