postgrelize / CopyFromOptions
Type Alias: CopyFromOptions<T> ​
CopyFromOptions<
T> =QueryOptionsBase&Readonly<{columns?: readonly (keyofT&string)[]; }>
Defined in: src/model/copy-options.ts:17
postgrelize extensionOptions of Model.copyFrom, which loads rows with COPY ... FROM STDIN. PostgreSQL extension.
Type Parameters ​
T ​
T = Values
See ​
Example ​
ts
const opts: CopyFromOptions<User> = { columns: ['name', 'email'], transaction };
await User.copyFrom([{ name: 'Ann', email: 'a@example.com' }], opts);