Created
July 22, 2020 20:45
-
-
Save mzibari/1a2f121f7c21203cd7ea24a1342078f9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
How are the syntaxes async and await useful when writing JavaScript code? | |
It allows for the use of try catch in an asynchronous code | |
With respect to Knex, how does the transaction method relate to BEGIN and COMMIT syntax in PostgreSQL? | |
The concept behind the two is the same, a pending transaction that has to be commited. If there is a connection failure, the database will rollback any queries executed on that connection to the pre-transaction state. | |
What is a "sequence table" in PostgreSQL? | |
It's a special table created by typing CREATE SEQUENCE name; | |
It's a umber generator, you can use nextval, currval, and setval to operate on the sequence. | |
What does RESTART IDENTITY CASCADE do? | |
Restart the identity squence and deleted all referenced rows | |
What does SELECT setval('blogful_users_id_seq', 1) do? | |
Update the sequence value after selecting |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment