Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
1. Async keyword makes the fucntion return a promise and it allows you to use await in it. await keyword before a promise makes JS wait until that promise is settled and then returns a result or an error.
2. For any postgreSQL transaction it begins with a BEGIN and ends with a COMMIT.
3. Sequence tables are single-row tables created through the command line. Sequence objects are most often used for creation of unique identifiers.
4. RESTART IDENTITY CASCADE - when used with truncate resets teh sequences assoicated with the columns and adding cascade makes sure all the sequences of all affected tables are reset.
5.setval() -> will update your sequence and in this case make the id 1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.