README "Design notes" says connection and result share one external pointer

オープン 初心者向け
#670 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
1/5
見積もり時間
1時間未満
初心者へのやさしさ
72/100
issue の種類
ドキュメント
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
postgresql, r
領域
documentation

調査の方向性

README.md の “Design notes” セクションを読み、最後の文を、issue に記載された接続と結果の動作(R/dbSendQuery_PqConnection.R と src/DbConnection.cpp を含む)と比較してください。新しいクエリが始まったときに開いている結果に何が起きるかを正確に説明するよう、その文を書き換えるか削除してください。README が両方のオブジェクトで同じ外部ポインターを共有すると主張しなくなれば完了です。

索引モデルが issue の本文から書いたものです。

説明

The "Design notes" section of README.md ends with: "and both the connection and result objects point to the same external pointer" (README.md#L84-L87). That is no longer true: a PqResult has its own ptr slot, created by result_create(conn@ptr, ...) in R/dbSendQuery_PqConnection.R, and the C++ connection only remembers its current result (pCurrentResult_ in src/DbConnection.cpp); starting a new query cleans up that result and cancels it if it is incomplete.

Reproducer (needs a running PostgreSQL server):

library(RPostgres)
con <- dbConnect(Postgres())
res <- dbSendQuery(con, "SELECT 1")
identical(con@ptr, res@ptr)
#> [1] FALSE
# expected by the README: TRUE
dbClearResult(res)
dbDisconnect(con)
  • Reword the last sentence of "Design notes", e.g. "and a new query on a connection cancels any result set still open on it" (the wording #607 uses in its new "Goals and non-goals" section), or drop the section in favor of #607's.

Severity: low (documentation only).

Found during the clean review of #607.


Generated by Claude Code

主要言語
R
スター
345
フォーク
81
平均マージ
8時間 21分
マージ済み PR(30日)
18

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

r-dbi/RPostgres のほかの issue

r-dbi/RPostgres の issue をすべて見る

似ている issue

R の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。