Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass DatabaseDescriptor to -executeSQL #5557

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jparise
Copy link

@jparise jparise commented Apr 3, 2024

Summary

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:

public abstract DatabaseExecuteSqlResponse executeSQL(
DESCRIPTOR databaseDescriptor, String query);

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).

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Do not delete this pull request or issue due to inactivity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants