Skip to content

Add support for MongoDB for property read-write #9

@VigneshVSV

Description

@VigneshVSV

There are certain settings in hardware which are helpful to be backed up to databases as the hardware "forgets" the setting when power cycled. It may also go to a default setting.

Since settings are generally modelled as properties, after the property write, the value can be stored to the database.

Currently SQLite, MySQL/postgres and JSON file storage is supported.

It's useful to have a JSON compatible DB as well.

Involved tasks -

  • subclass ThingDB for mongo
  • implement all operations which are imported for SQLite or other databases
  • support auto-setup in case use_default_db is set to True at Thing.__init__
  • verify working at Property._post_value_set
  • write tests or add it to the tests in test_property.py

Metadata

Metadata

Assignees

Labels

beginnerbeginner level good first issues, usually issues that can worked on without skimming the whole repogood first issueGood for newcomers

Projects

Status

In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions