Guest User

Untitled

a guest
Feb 27th, 2018
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. async function PutData(name, email, ssn, amount){
  2. const client = new Client({
  3. user: 'postgres',
  4. host: 'localhost',
  5. database: 'postgres',
  6. password: 'Pluto050196',
  7. });
  8. await client.connect();
  9. const data = await client.query(
  10. 'SELECT date, name, email, amount, ssn FROM tafla',
  11. )
  12. await client.end()
  13. const gogn = data.rows;
  14. gogn.unshift(['date', 'name', 'email', 'amount', 'ssn']);
  15. return gogn;
  16. }
Add Comment
Please, Sign In to add comment