Skip to content

[FEAT] connectors() as S7 object #135

@akselthomsen

Description

@akselthomsen

Feature Request

Description

Propose to change connectors() to be an S7 object, for the following reasons:

  1. Adding attributes (datasources and metadata) as read-only properties to an S7 object will safeguard against overwriting them.
  2. More robust method dispatch if any other functionality needs to work with the connectors object.
  3. Accessing e.g. metadata is easier with cnts@metadata than with a helper function. Consider to keep helper functions if existing solutions rely on them.
  4. All existing use with e.g. cnts$my_connector will still work.

Proposed Solution

  1. Create new connectors() S7 class
  2. Parent class to be S7::class_list
  3. The object it self will therefore still be a list of Connector objects, meaning the interface for the users will stay the same.
  4. Implement setter functions for metadata and datasources properties to make sure they are read-only.
  5. Update utility functions if needed (and delete them if no longer relevant).
  6. Update connect() as needed to implement this as well.

Impact

No impact on general use of connector(s). Only change for users is if we decide to change the API in some of the helper functions around metadata or datasources.

Related Issues

Easier dispatch on connectors might be useful as an alternative to #134 in downstream packages implementing business logic.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions