postgrelize / TableSampleOptions
Type Alias: TableSampleOptions ​
TableSampleOptions =
Readonly<{method:"BERNOULLI"|"SYSTEM";percent:number;seed?:number; }>
Defined in: src/model/source-options.ts:14
postgrelize extensionTABLESAMPLE of a table. PostgreSQL extension.
Example ​
ts
const sample: TableSampleOptions = { method: 'BERNOULLI', percent: 10, seed: 42 };
const rows = await Post.findAll({ sample });