Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const { Client } = require('pg');
- const { fs } = require('fs');
- let client = new Client({
- user: 'postgres',
- password: '1234',
- host: 'localhost',
- port: '5432',
- database: 'my_store'
- });
- let options = [
- {
- "table_name": "test",
- "rows": 100000,
- "columns": [
- {
- "name": "words",
- "type": "words",
- "params": {
- "number": 56
- }
- }
- ]
- }
- ];
- for (let table of options) {
- for (let i = 0; i < table.rows; ++i) {
- let query = 'insert into ' + table.table_name + ' (';
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement