a guest Sep 19th, 2019 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- /src/things/things-router.js, line 37
- - it extrapolates the promise from inside the .all() in the chains for each route, but it is still a promise type function which includes catch() and next() allowing the promises to continue in sequence
- With respect to Knex, how does the transaction method relate to BEGIN and COMMIT syntax in PostgreSQL?
- seed.thingful_tables.sql, beginning and end
- - BEGIN creates a transaction block, and the statements in the block are all executed in a single transaction. COMMIT marks the end of the transaction block.
- What is a "sequence table" in PostgreSQL?
- - It is table data created in sequence due to the relationships between datasets
- - thingful_reviews exists in sequence with thingful_things because it relies on both the thing_id and the user_id
- - thingful_things exists in sequence with thingful_users because it relies on the user_id
- What does RESTART IDENTITY CASCADE do?
- seed.thingful_tables.sql, line 7
- - used when truncating a table (cascade, so removing all items related to an id attached to the truncated items) and restarting identities from all truncated items. So, when more items are added, the ids in the table are reset to begin at 1 again (i think)
- What does SELECT setval('blogful_users_id_seq', 1) do?
- - updates the value of the object in the sequence 'blogful_users_id_seq' to 1, so that the subsequent values will follow (nextval is 2)
RAW Paste Data