Skip to content

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

@nvarscar

Description

@nvarscar

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    corePython-related, no Postgres knowledge neededenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions