Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All object collections should support .new() and .add() methods #10

Open
nvarscar opened this issue Feb 20, 2023 · 0 comments
Open

All object collections should support .new() and .add() methods #10

nvarscar opened this issue Feb 20, 2023 · 0 comments
Labels
core Python-related, no Postgres knowledge needed enhancement New feature or request

Comments

@nvarscar
Copy link
Collaborator

nvarscar commented Feb 20, 2023

User story

As a DBA, I want to be able to control the creation of the objects on the Postgresql server using Dynamic Objects and Collections so that my productivity increases.

Acceptance Criteria

  • .new() method should be added to object collections
    • .new() should create an ephemeral object with default settings, only requiring a name as a parameter.
    • The object will remain ephemeral until either .create() is called, or it's added to the parent collection using the .add() method.
    • Documentation should only refer to the child object class instead of listing all possible arguments.
  • .add() method should be added to object collections. It should:
    • check if that object already belongs to a different collection (and fail if the object belongs to a different parent)
    • add the said object to the collection
    • assign parent
    • call .create() of that object
  • These methods should either have an abstract implementation on the parent classes and be enforced on all child classes, or they should be generic enough to work on every child class as is. It is also possible to still ask for implementation on the child classes, but use super() for the common bits.
@nvarscar nvarscar added enhancement New feature or request core Python-related, no Postgres knowledge needed labels Feb 20, 2023
@nvarscar nvarscar changed the title All object collections should support .create() and .add() methods All object collections should support .new() and .add() methods Feb 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Python-related, no Postgres knowledge needed enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant