Skip to content
This repository has been archived by the owner on Nov 22, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
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