Skip to content

postgrelize / TableSampleOptions

Type Alias: TableSampleOptions ​

TableSampleOptions = Readonly<{ method: "BERNOULLI" | "SYSTEM"; percent: number; seed?: number; }>

Defined in: src/model/source-options.ts:14

postgrelize extension

TABLESAMPLE of a table. PostgreSQL extension.

Example ​

ts
const sample: TableSampleOptions = { method: 'BERNOULLI', percent: 10, seed: 42 };
const rows = await Post.findAll({ sample });

Released under the MIT License.