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

Open Beginner friendly
#361 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Active
Tech stack
kotlin, spring
Domain
documentation

Research direction

The claim sits in docs/02-connecting.md (lines 3-4) and docs/design.md (around line 125 and lines 129-131). Check the drivine4j facts in its docs/04-quick-start.md and in src/main/kotlin/org/drivine/connection/DataSourceMap.kt before editing. Done means both files state that the flat DATABASE_* variables are Drivine for TypeScript's, and that drivine4j uses Spring properties (database.datasources.<name>.type or DATABASE_DATASOURCES_<NAME>_TYPE), so one .env does not yet cover the JVM.

Written by the indexing model from the issue text.

Description

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.

Dominant language
Python
Stars
1
Forks
0
Avg merge
2h 27m
Merged PRs (30d)
161

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from liberation-data/drivine-python

All issues in liberation-data/drivine-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.