name the real database driver modules in std.sql's header - #640
Merged
Conversation
the header sent readers to std.sql.sqlite and std.sql.postgres. neither has ever existed: there is no sqlite driver, and the postgres and mysql drivers live one level up from std.sql rather than under it, in two layers — std.postgres and std.mysql hold a connection you manage, while std.db.postgres and std.db.mysql pool them behind a url the way std.web sits above std.net.http. the header now names those four and says which to reach for. docs/db.md already had this right, so this is the module comment catching up to it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
std/sql.pith's header sent readers tostd.sql.sqliteandstd.sql.postgres. neither has ever existed — there is no sqlite driver anywhere in the tree, and the postgres and mysql drivers live one level up fromstd.sqlrather than under it.worse than a broken pointer, the wrong path hid a distinction that matters. there are two layers:
std.postgres,std.mysql— the wire-protocol clients, where you hold the connectionstd.db.postgres,std.db.mysql— pooled behind a url, the waystd.websits abovestd.net.http, so many green tasks share one handlethe header now names those four and says which to reach for.
docs/db.mdalready described the layering correctly, so this is the module comment catching up to the docs rather than a change of story.comment-only; no code moved and no signature changed.
what was tested
std/sql.pith6,std/db.pith8,std/postgres.pith6,std/mysql.pith5 — all 0 failedmake run-regressions-only: 303 passed, 0 failedpith_main doc --check std/sql.pith: ok