Unlike the other DatabaseDriver protocol methods, -executeSQL: wasn't passing the DatabaseDescriptor object. The database driver implementation needs that context in order to know which database connection to use.
This matches the Android DatabaseDriver interface:
I renamed this method to -executeSQLWithDatabaseDescriptor:sql: to match the convention used by the other methods.
Changelog
In DatabaseDriver, rename -executeSQL: to executeSQLWithDatabaseDescriptor:sql: and pass the DatabaseDescriptor object.
Test Plan
Verified the MockDatabaseDriver implementation continues to work as before, and verified that the execute command now receives the DatabaseDescriptor (in a local project).
Summary
Unlike the other
DatabaseDriver
protocol methods,-executeSQL:
wasn't passing theDatabaseDescriptor
object. The database driver implementation needs that context in order to know which database connection to use.This matches the Android DatabaseDriver interface:
https://github.com/facebook/flipper/blob/9053a6c2ef61f7033ef3c006b2c4c6edab7dc41d/android/src/main/java/com/facebook/flipper/plugins/databases/DatabaseDriver.java#L52-L53
I renamed this method to
-executeSQLWithDatabaseDescriptor:sql:
to match the convention used by the other methods.Changelog
In DatabaseDriver, rename -executeSQL: to executeSQLWithDatabaseDescriptor:sql: and pass the DatabaseDescriptor object.
Test Plan
Verified the
MockDatabaseDriver
implementation continues to work as before, and verified that theexecute
command now receives the DatabaseDescriptor (in a local project).