greenelab / connectivity-search-backend

Django backend for hetnet connectivity search
https://search-api.het.io
BSD 3-Clause "New" or "Revised" License
6 stars 2 forks source link

Harmonize database node ids between postgres and neo4j #36

Closed dhimmel closed 5 years ago

dhimmel commented 5 years ago

Currently, we have two internal database ids for nodes: one used by the Hetionet neo4j database and one used by this repo's postgres db. I am thinking we should consolidate and use the neo4j ids in this database.

dhimmel commented 5 years ago

To get all nodes, we could use a cypher query like:

MATCH (node)
RETURN
  id(node) AS neo4j_id,
  head(labels(node)) AS node_label,
  properties(node) AS data
ORDER BY neo4j_id
LIMIT 10