Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@aosasona
Copy link
Owner

@aosasona aosasona commented Oct 19, 2025

Note

collections rename, items copy, and items move are not implemented yet, those will be in a future release.

The following commands and subcommands have been implemented:

  • collections list: lists all collections in the current instance
  • collections create: creates a new collection with the given name (if the --force flag is used, a suffix is appended)
  • collections delete: deletes an existing collection and all its contents
  • collections default: show the current default collection
  • collections default set: change the default collection to the requested ID
  • collections default unset: reset the default collection to ""

This is just much more practical than a single method to lookup a single
collection by either the identifier or the name, then a `nil` check can
be used to check for its presence.
Conflicts in things like the ID should be automatically ignored, other
possible collisions like a collection's name is left to the dispatcher
to figure out.

For example, in the case of a duplicate collection (name), we can just
add a number, but if the event specifies a specific ID that already
exists, we don't care what the name is, we need to ignore it.
`WherePK` only works when you have set the ID on the target struct.
We already have it there anyway and it already does it by default.
@aosasona aosasona linked an issue Oct 19, 2025 that may be closed by this pull request
3 tasks
@aosasona aosasona merged commit 1ad3f36 into master Oct 19, 2025
7 checks passed
@aosasona aosasona deleted the 39-implement-collections branch October 19, 2025 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement collections

2 participants