vincent-herlemont / native_db

Drop-in embedded database in Rust
MIT License
433 stars 17 forks source link

feat: Return the removed value as part of the Result when calling remove #96

Closed AlvinKuruvilla closed 8 months ago

AlvinKuruvilla commented 8 months ago

This patch addresses a TODO to return the removed value when calling remove. Now native returns the removed value in the Result

vincent-herlemont commented 8 months ago

Thanks you @AlvinKuruvilla for you PR !!

vincent-herlemont commented 8 months ago

Can you please update commit name by conventional commit formatting?

https://www.conventionalcommits.org/en/v1.0.0/

AlvinKuruvilla commented 8 months ago

Hey @vincent-herlemont, it looks like all of the CI checks pass except the commit check. I think it has a problem with the first commit I made, but I'm not sure if there is a way to go back and change it now.

vincent-herlemont commented 8 months ago

Hey @vincent-herlemont, it looks like all of the CI checks pass except the commit check. I think it has a problem with the first commit I made, but I'm not sure if there is a way to go back and change it now.

@AlvinKuruvilla you have to squatch your commits. Follow this documentation this documentation section Squashing Commits.


Explanation:

To squash commits in Git and follow semantic commit format, you'll need to use an interactive rebase. Here's a step-by-step guide on how to do it:

  1. Start an Interactive Rebase:

    • First, you need to start an interactive rebase session. If you want to squash all commits since the branch diverged from main (or another branch), you can use:
      git rebase -i main
    • If you know the specific number of commits you want to squash, use HEAD~n, where n is the number of commits. For example, if you want to squash the last 3 commits, you would use:
      git rebase -i HEAD~3
  2. Mark Commits for Squashing:

    • In the text editor that opens, you'll see a list of commits. They are listed from oldest at the top to most recent at the bottom.
    • Leave the first commit as pick, and change the word pick to squash or s for all other commits you want to squash into the first one.
    • Save and close the editor.
  3. Rewrite the Commit Message:

    • After squashing, another text editor will open for the commit message.
    • Follow the semantic commit format here. This format typically includes a type (such as fix:, feat:, docs:, style:, refactor:, test:, or chore:), a short description, and optionally a body and footer.
    • For your specific case, you might write something like:
      docs: correct sentences in documentation
    • Save and close the editor.
  4. Finalize the Rebase:

    • Once you complete the rebase, Git will apply the changes.
  5. Force Push the Squashed Commit:

    • If you've already pushed the original commits to a shared repository, you'll need to force push your changes:
      git push origin <your-branch-name> --force
vincent-herlemont commented 8 months ago

@AlvinKuruvilla Well done!! Your work has been merged 🙂!

vincent-herlemont commented 5 months ago

:tada: This PR is included in version 0.6.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: