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

Use URI::db instead of DSN? #100

Open
tsibley opened this issue Jan 24, 2015 · 3 comments
Open

Use URI::db instead of DSN? #100

tsibley opened this issue Jan 24, 2015 · 3 comments
Labels

Comments

@tsibley
Copy link

tsibley commented Jan 24, 2015

Yertl looks promising! It reminds me a bit of what might happen if you combined Sqitch and recs.

Sqitch recently switched to using database URIs via URI::db (spec) instead of DSNs, and I think they're much better for clarity and consistency. Perhaps they'd be an improvement to Yertl?

@preaction
Copy link
Owner

Ha! Yes! recs looks very much like what I'm planning (but with YAML instead of JSON). Interoperability would be interesting (I want Yertl to be able to use JSON or XML or any supported format for its streams, which it seems would make recs commands available).

Why not both? DSNs for the people coming from any current DBI usage, URI::db for an easier, clearer way to type it in (and probably a better way of displaying the configured databases in a short list for those who have hundreds of configured databases [which the thing I'm reimplementing here from $work does already have]).

The config file should probably still split it into fields for easy querying using Yertl tools (give me all my mysql databases, or all the databases from a certain host), but I suspect URI::db is a lot easier to split up like that. I'm certain that there are DBI DSNs that I do not handle correctly (because I really only tested three).

@tsibley
Copy link
Author

tsibley commented Jan 24, 2015

Both sounds great! They shouldn't conflict since all DBI DSNs start with dbi:. (Under the hood, I wonder about even supporting "dbi" as a URI::db "engine", i.e. db:dbi:mysql(RaiseError=>1):db=test;port=42... hmmm.)

@tsibley
Copy link
Author

tsibley commented Jan 24, 2015

As an aside, it'd be pretty easy to make recs slurp in YAML and spit it back out too.

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

No branches or pull requests

2 participants