Skip to content

Rework tag translator#470

Merged
joker234 merged 35 commits into
masterfrom
rework_tag-translator
Nov 9, 2022
Merged

Rework tag translator#470
joker234 merged 35 commits into
masterfrom
rework_tag-translator

Conversation

@rtroilo
Copy link
Copy Markdown
Member

@rtroilo rtroilo commented Nov 2, 2022

Rework of OSHDB(jdbc/h2) connection and TagTranslator handling.

Description

  • OSHDB(Jdbc/h2) Database now depends on a javax.sql.DataSource instead of a single java.sql.Connection.
  • OSHDBH2, creates, if not otherwise provided, a org.h2.jdbcx.JdbcConnectionPool as as DataSource
  • OSHDBJdbc, don't create a DataSource by it self, so a DataSource has to be provided. Like HikariCP or others.

⚠️The provided DataSource have to be thread-safe!

  • Keytables connections and TagTranslator are now directly provided be the OSHDBDatasource.

Before:

var oshdb = new OSHDBJdbc(conn);
var keytables = new OSHDBJdbc(conn);
var mr = OSMEntitySnapshotView.on(oshdb)
          .keytables(keytables)
          …

after:

var oshdb =  new OSHDBJdbc(dsGrid, dsKeytables);
var tagTranslator = oshdb.getTagTranslator();
var mr = OSMEntitySnapshotView.on(oshdb)
          …
  • Renaming TagTranslator OSHDB to OSM methodes to lookupTag and lookupRole
  • new functionality added to TagTranslator for bulk loading.
Set<OSHDBTag> tags;
Map<OSHDBTag, OSMTag> mapping = tagTransator.lookupTag(tags);

OSMEntity osm;
Map<OSHDBTag, OSMTag> mapping = tagTransator.lookupTag(osm.getTags());

Checklist

Please check all finished tasks. If some tasks do not apply to your PR, please cross their text out (by using ~...~) and remove their checkboxes.

mmerdes added a commit that referenced this pull request Nov 3, 2022
mmerdes added a commit that referenced this pull request Nov 3, 2022
mmerdes added a commit that referenced this pull request Nov 3, 2022
mmerdes added a commit that referenced this pull request Nov 3, 2022
mmerdes added a commit that referenced this pull request Nov 3, 2022
mmerdes added a commit that referenced this pull request Nov 3, 2022
mmerdes added a commit that referenced this pull request Nov 4, 2022
mmerdes added a commit that referenced this pull request Nov 4, 2022
mmerdes added a commit that referenced this pull request Nov 4, 2022
mmerdes added a commit that referenced this pull request Nov 4, 2022
mmerdes added a commit that referenced this pull request Nov 9, 2022
mmerdes added a commit that referenced this pull request Nov 9, 2022
Copy link
Copy Markdown
Contributor

@mmerdes mmerdes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm 👍

@joker234 joker234 merged commit 20bd2c8 into master Nov 9, 2022
@joker234 joker234 deleted the rework_tag-translator branch November 9, 2022 14:53
joker234 added a commit that referenced this pull request Nov 10, 2022
@joker234 joker234 mentioned this pull request Nov 10, 2022
6 tasks
joker234 added a commit that referenced this pull request Nov 10, 2022
joker234 added a commit that referenced this pull request Nov 11, 2022
rtroilo pushed a commit that referenced this pull request Nov 11, 2022
rtroilo pushed a commit that referenced this pull request Nov 11, 2022
rtroilo pushed a commit that referenced this pull request Nov 11, 2022
rtroilo pushed a commit that referenced this pull request Nov 11, 2022
rtroilo pushed a commit that referenced this pull request Nov 11, 2022
rtroilo pushed a commit that referenced this pull request Nov 11, 2022
rtroilo pushed a commit that referenced this pull request Nov 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants