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

Usage of new Npgsql features #2787

Closed
gfoidl opened this issue Nov 21, 2023 · 2 comments
Closed

Usage of new Npgsql features #2787

gfoidl opened this issue Nov 21, 2023 · 2 comments

Comments

@gfoidl
Copy link
Contributor

gfoidl commented Nov 21, 2023

Npgsql offers some new features that should be considered in Marten / evaluated for use in Marten.

Parameters w/ positional placeholders

See Positional and named placeholders.

Area: perf-optimization, as Npgsql doesn't need to rebuild the SQL to substitute the named parameters with the PostgreSQL expected positional ones.

Available since Npgsql 6.

Batch API

Cf. #2424 and Raw SQL mode and new batching API

Area: perf-optimization

DbDataSource and NpgsqlDataSourceBuilder

See DbDataSource.
Accept a DbDataSource in StoreOptions.Connection(), and use that for creating the connections instead of the connection-string.

Area: usability

This would also be useful for hosted scenarios, e.g. Azure PostgreSQL flexible server, where authentication is done via "Managed Identities" and the access-token needs to be refreshed.

For reference: #2550 mentions that point too.


PS: I'd like to contribute to these improvements (at the moment I'm quite busy, but starting with next year I think to have to time in order to dive into this)

@jeremydmiller
Copy link
Member

Subsuming this into #2887

@gfoidl Can you follow into that issue and chime in? @oskardudycz did the work to move us to DbDataSource

@gfoidl
Copy link
Contributor Author

gfoidl commented Jan 3, 2024

@jeremydmiller sure, thanks for moving this forward. I try (and like) to help where I can.

Side note: ATM I'm working on a larger project with Marten 6.x, and when things in that project stabilize I'll give Marten 7-prereleases a try to see how it goes in production.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants