Database Flashcards
Command to display tables in sqlite terminal?
.table
How to start sqlite database
sqlite3
How to start, stop, and check the status of mysql server
- mysql.server start
- mysql.server stop
- mysql.server status
How do you login to mysql
mysql -u -p
How do you create a new promise using bluebird?
var promise = require('bluebird'); new Promise(function(resolve, reject) { });
How do you describe .then in promise
Then is a continuation method for promises which takes a function that takes the value from the previous promise.
What is Promise.all
This method is useful for when you want to wait for more than one promise to complete. It takes an iterable or a promise of an iterable. Examples of this could be for when you want to do multiple API calls and process them together or when you want to iterate over an array and process the result.