UNPKG

soda-angular

Version:
18 lines (17 loc) 456 B
export class LimitClause { constructor(maxRows) { if (maxRows <= 0) { throw new Error("Max Rows must be 1 or greater"); } if (!Number.isInteger(maxRows)) { throw new Error("Max Rows must be a whole number"); } this.MaxRows = maxRows; } toString() { if (this.MaxRows > 0) { return `$limit=${this.MaxRows}`; } return ""; } }