Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework tag translator #470

Merged
merged 35 commits into from
Nov 9, 2022
Merged

Rework tag translator #470

merged 35 commits into from
Nov 9, 2022

Conversation

rtroilo
Copy link
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
@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
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
joker234 added a commit to GIScience/ohsome-api 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