Skip to content

Add support for MongoDB (or any other database) 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 and MySQL/postgres is supported.

It's useful to have a JSON driven DB as the default seriliazer is JSON for all operations. It also helps the package end-developer to stick to JSON data types.

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

If interested, do the same for another database binding (please copy this issue and propose the binding).

Metadata

Metadata

Assignees

No one assigned

    Labels

    beginnerbeginner level good first issues, usually issues that can worked on without skimming the whole repogood first issueGood for newcomersintermediateintermediate level good first issues, might be little harder to complete

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions