Pg-promise: using query files to create multiple records

Created on 8 Mar 2016  路  6Comments  路  Source: vitaly-t/pg-promise

Assume you have this input:

const data = [
  ['Minnesota', 'MN'],
  ['Vermont', 'VT']
];

Is there any plan to support generating this kind of SQL?

INSERT INTO state (name, abbr) VALUES ('Minnesota', 'MN'), ('Vermont', 'VT')
question

Most helpful comment

Radddddd. Are you on twiter? I just posted this: https://twitter.com/tkellen/status/728670878989422592

All 6 comments

Have you seen this? - Performance Boost

Ah! No, I haven't. This seems like exactly what I was looking for. Thanks!

You are welcome! :)

There is a further progress with this in 4.0.6 update ;)

Radddddd. Are you on twiter? I just posted this: https://twitter.com/tkellen/status/728670878989422592

Cheers! I keep working on documentation and tests. Any technical feedback would be nice ;)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

leemhenson picture leemhenson  路  5Comments

Juanflugel picture Juanflugel  路  3Comments

msjoshi picture msjoshi  路  4Comments

illarionvk picture illarionvk  路  3Comments

seanh1414 picture seanh1414  路  4Comments