Docs: drivine4j doesn't read the flat DATABASE_* variables, as 02-connecting.md and design.md say

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

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

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

評価

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

調査の方向性

この記述は docs/02-connecting.md(3~4行目)と docs/design.md(125行目付近と129~131行目)にあります。編集する前に、drivine4j の docs/04-quick-start.md と src/main/kotlin/org/drivine/connection/DataSourceMap.kt で事実関係を確認してください。両方のファイルで、フラットな DATABASE_* 変数が TypeScript 版 Drivine のものであること、そして drivine4j は Spring のプロパティ(database.datasources.<name>.type または DATABASE_DATASOURCES_<NAME>_TYPE)を使うため、単一の .env ではまだ JVM をカバーできないことが明記されていれば完了です。

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

説明

documentation

docs/02-connecting.md says the environment variables are the same as Drivine for TypeScript's "and drivine4j's, so one .env serves an application in any of them" (https://github.com/liberation-data/drivine-python/blob/64799691075093625a09db9ec5442ae7c2d498b6/docs/02-connecting.md#L3-L4). docs/design.md says the same of "TypeScript and the JVM" (https://github.com/liberation-data/drivine-python/blob/64799691075093625a09db9ec5442ae7c2d498b6/docs/design.md#L125 and #L129-L131).

That holds for Drivine for TypeScript, which reads DATABASE_TYPE, DATABASE_HOST and the rest, and <PREFIX>_DATABASE_* for a second database (https://github.com/liberation-data/drivine/blob/93974ae499e8b3d283e0fdbc2265ca36ae560f11/src/connection/ConnectionProperties.ts#L61-L68). It doesn't hold for drivine4j: it reads no flat DATABASE_* variables. Its datasources are Spring properties under database.datasources.<name> (https://github.com/liberation-data/drivine4j/blob/8bb9acd5f93fa5b8c7d77df6ce634ee07e16942e/docs/04-quick-start.md#L9-L27), which Spring's relaxed binding takes from the environment as DATABASE_DATASOURCES_<NAME>_TYPE, DATABASE_DATASOURCES_<NAME>_HOST and so on, or from a DataSourceMap built in code (https://github.com/liberation-data/drivine4j/blob/8bb9acd5f93fa5b8c7d77df6ce634ee07e16942e/src/main/kotlin/org/drivine/connection/DataSourceMap.kt).

Fix

Say that the variables are Drivine for TypeScript's, and that drivine4j takes the same settings as Spring properties (database.datasources.<name>.type, or DATABASE_DATASOURCES_<NAME>_TYPE in the environment), so one .env serves Python and Node but not the JVM as it stands. In both files.

主要言語
Python
スター
1
フォーク
0
平均マージ
1時間 53分
マージ済み PR(30日)
157

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

liberation-data/drivine-python のほかの issue

liberation-data/drivine-python の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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