Skip to content

Added conventional resolution of the connector using connection string #112

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

Merged
merged 4 commits into from
Jun 29, 2025

Conversation

oskardudycz
Copy link
Contributor

@oskardudycz oskardudycz commented Mar 29, 2025

Thanks to that, it'll be possible to use Dumbo with the default access by passing connection string, then on the first execution the connection pool will be evaluated and resolved based on parsing connection string.

This will make database switching easier and more manageable. Promise resolution is cached, so only a slight performance hit will be added (it should not be noticeable for most cases).

Pongo is still just using PostgreSQL; generic database resolution for it will need to come as a follow-up.

More testing for SQLite will need to come, but I don't want to keep this PR hanging for too long. It was already open for 3 months.

@oskardudycz oskardudycz force-pushed the dumbo_db_resolution branch 3 times, most recently from fb083a0 to d321253 Compare April 26, 2025 11:16
@oskardudycz oskardudycz force-pushed the dumbo_db_resolution branch 6 times, most recently from 178d277 to df65e01 Compare May 11, 2025 16:52
@oskardudycz oskardudycz force-pushed the dumbo_db_resolution branch from df65e01 to 7abb90b Compare May 11, 2025 16:53
@@ -3,11 +3,16 @@ import 'dotenv/config';
import Benchmark from 'benchmark';
import pg from 'pg';
import { rawSql, single } from '..';
import { defaultPostgreSQLConenctionString, dumbo } from '../pg';
import {
defaultPostgreSQLConenctionString,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch, fixed 👍

@oskardudycz oskardudycz marked this pull request as ready for review June 29, 2025 08:43
@oskardudycz oskardudycz merged commit a54636e into main Jun 29, 2025
1 check passed
@oskardudycz oskardudycz deleted the dumbo_db_resolution branch June 29, 2025 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants