NREL / BuildingMOTIF

Building Metadata OnTology Interoperability Framework (BuildingMOTIF). For models, see https://models.open223.info/
https://buildingmotif.readthedocs.io/
Other
49 stars 7 forks source link

Refactor Table Connection #291

Closed TShapinsky closed 11 months ago

TShapinsky commented 11 months ago

Changes

Make the most basic get method not end in by_id

Half of the methods of this type were already like this. I'm not especially partial either way, but it seems fine that the most basic way of finding the object (by it's primary key) appears as the default.

Change one instance of remove into delete

We consistently use delete in this file, except for in one place. This corrects that.

Changes I'm considering

Removing db_ from method names

I see this as possibly redundant as any method from this file will return the DB version of the object. I feel like this could make code which use these functions more readable, but I can also see why we wouldn't want to do this.