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

[drift_flutter] driftDatabase more options #3183

Open
FMorschel opened this issue Aug 28, 2024 · 2 comments
Open

[drift_flutter] driftDatabase more options #3183

FMorschel opened this issue Aug 28, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@FMorschel
Copy link
Contributor

FMorschel commented Aug 28, 2024

Is your feature request related to a problem? Please describe.
I'd like to be able to use the new API but it is missing some options currently.

Describe the solution you'd like
In my specific case, I'm missing the logStatements and the ability to select whether or not to run the DB in a separate isolate. There are probably more options that others will miss but in my case, only those would satisfy.

@FMorschel FMorschel added the enhancement New feature or request label Aug 28, 2024
@simolus3
Copy link
Owner

and the ability to select whether or not to run the DB in a separate isolate

I agree with the logStatements option (although that should potentially be a custom QueryInterceptor for better integration with other logging packages), but why would you want to run the database in the same isolate?
drift_flutter is supposed to apply drift with reasonable defaults for Flutter projects, and it seems to me that hosting the database in the same isolate as the UI is not a reasonable default.

@FMorschel
Copy link
Contributor Author

I don't think it should be the default, but to have the option to do it would be nice.

Maybe I'm not familiar enough with isolates and their performances today but wouldn't they take some time to copy the variables to the main isolate every time? That could be something unwanted in some cases for small dbs I think, wouldn't it?

Anyway, if you don't think that's valid I don't think I could make a better point than the above and you can simply ignore that.

Also not sure if there are any other parameters that would be good to have the option but I think since you know the API you can probably think of them and add to this as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants