Skip to content

meta: ideas for foscia #22

@paul-thebaud

Description

@paul-thebaud

Here are some ideas that might/should be implemented inside foscia:

Todo

  • feat: load, loadMissing (and other, such as fresh and refresh) using connections
  • feat: experiment included or loading relations subqueries capabilities
  • feat: relations that can be lazy loaded on the fly (lazy function to convert relation?)
  • feat: rename action context methods for shorter calls
  • feat: lazy (aggregated) attributes which are eager/lazy loaded
  • feat: consumeContext which support action calls without use of context
  • feat: implement paginator dependency #24
  • feat: support any result with any model or instances actions.
  • feat: support belongsTo, etc. (and support inverse guessing from it)
  • feat: warn log if model is used on action it is not attached to?
  • feat: add errors/logs with link to documentation to help issues resolving
  • feat: date transformers correctly specifying TZ provided or not (default UTC, TZ when suffixed such as toDateTimeTz, and a special toShiftedDate which do an epoch shift for date input resolution)
  • feat: experiment connection+type as generic on model, for strict typing with registry
  • docs: reorganize docs (no more "core concepts"/"digging deeper")
  • chore: remove useless type assertions (... as ...)
  • chore: use deprecated instead of internal
  • feat: provide origin snapshot in onUpdated etc. hooks

Done

  • feat(core): support relations inverse #3
  • feat(core): model assembled property #23
  • feat: better errors (specific for cachedOrFail, original for oneOrFail?)
  • feat: experiment composite attributes definition
    Such as one call to define an attribute and a relation, like userId and user using a belongsTo factory.
  • feat: variadic action factory direct run
  • feat: dependencies using action instead of context
  • feat: real support for relations inside snapshots
    Model instances snapshots should deeply lock state of relations (by snapshoting related instances too, instead of storing direct references). This would make the snapshot more realistic of a real state for the instance.
  • feat: serialization through snapshots instead of instances
    Instances and relations serialization should use snapshots instead of instances. This would avoid being able to changes a record's values after creating the action instance but before running it.
  • feat: add object configuration for attributes and relations factories
  • feat: remove static methods from model
  • feat: remove arrayable variadic
  • chore: remove use of using to improve code readability

Won't fix

  • feat: define to null initial snapshot of new instances Because this would break partial change checking. Instead, an empty snapshot is creating without the use of takeSnapshot. That new behavior improve build size reduction.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions