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

🧪 refactor: use TRUNCATE to reset the tables for postgres/ mysql #74

Merged
merged 1 commit into from
Mar 31, 2021

Conversation

r-52
Copy link
Contributor

@r-52 r-52 commented Mar 31, 2021

MySQL docs: https://dev.mysql.com/doc/refman/8.0/en/truncate-table.html
Postgres docs: https://www.postgresql.org/docs/current/sql-truncate.html

Safes some time if the tables are filled with a lot of data.

@r-52 r-52 force-pushed the r-truncate-rdbms branch from b9b2dc5 to 9076a02 Compare March 31, 2021 09:22
@ReneWerner87
Copy link
Member

ReneWerner87 commented Mar 31, 2021

https://www.tutorialspoint.com/difference-between-delete-and-truncate-in-sql-query#:~:text=Delete%20and%20truncate%20both%20commands,for%20deleting%20the%20specific%20data.

you are right, good found

note for all who wonder why it was not made for sqlLite -> here there is only DELETE FROM

@ReneWerner87 ReneWerner87 merged commit 8a84698 into gofiber:main Mar 31, 2021
@r-52 r-52 deleted the r-truncate-rdbms branch March 31, 2021 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants