neo4j-contrib / neomodel

An Object Graph Mapper (OGM) for the Neo4j graph database.

Home Page:https://neomodel.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Refactor independent `db` functions into `Database`

aanastasiou opened this issue · comments

Feature description (Mandatory)

A number of functions in neomodel/core.py and neomodel/util.py take a db argument whether explicitly, or implicitly (i.e. take db from the global context).

These can be refactored under the Database class.

This will result in better code organisation and it will also avoid circular import issues that appear at the moment when working on more advanced features.

However, this will also have a relatively large impact on tests and possibly user code, so it has to be scheduled for release appropriately.