Skip to content

DatabaseSessionService class: set a more explicit way to decide the schema #2217

@Istorn

Description

@Istorn

The class DatabaseSessionService permits to set up the connection to the DB via DB URL and add different flags via kwargs.

From my perspective it would be great to permit the user setting the schema as explicit parameter.

  • Reason: DB schema is one of the core elements when it comes to interact with the DB itself
  • Use case: PostgreSQL database, but it could be related to any other relational DB kind of
  • Proposal:

As is:

session_service = DatabaseSessionService(db_url, connect_args={"options": "-c search_path=NAME_OF_MY_SCHEMA"})

To Be:

session_service = DatabaseSessionService(db_url, schema="NAME_OF_MYSCHEMA")

Metadata

Metadata

Assignees

Labels

needs-review[Status] The PR is awaiting review from the maintainerservices[Component] This issue is related to runtime services, e.g. sessions, memory, artifacts, etc

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions