Advertisement
ArinaRaguzina

Untitled

Nov 14th, 2019
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. const { Client } = require('pg');
  2. const { fs } = require('fs');
  3.  
  4. let client = new Client({
  5. user: 'postgres',
  6. password: '1234',
  7. host: 'localhost',
  8. port: '5432',
  9. database: 'my_store'
  10. });
  11.  
  12. let options = [
  13. {
  14. "table_name": "test",
  15. "rows": 100000,
  16. "columns": [
  17. {
  18. "name": "words",
  19. "type": "words",
  20. "params": {
  21. "number": 56
  22. }
  23. }
  24. ]
  25. }
  26. ];
  27.  
  28. for (let table of options) {
  29. for (let i = 0; i < table.rows; ++i) {
  30. let query = 'insert into ' + table.table_name + ' (';
  31.  
  32. }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement