UNPKG

reduct-js

Version:

ReductStore Client SDK for Javascript/NodeJS/Typescript

30 lines (29 loc) 684 B
import { Status, parseStatus } from "./Status.js"; //#region src/messages/EntryInfo.ts /** * Information about entry */ var EntryInfo = class { constructor() { this.name = ""; this.blockCount = 0n; this.recordCount = 0n; this.size = 0n; this.oldestRecord = 0n; this.latestRecord = 0n; this.status = Status.READY; } static parse(bucket) { return { name: bucket.name, blockCount: BigInt(bucket.block_count), recordCount: BigInt(bucket.record_count), size: BigInt(bucket.size), oldestRecord: BigInt(bucket.oldest_record), latestRecord: BigInt(bucket.latest_record), status: parseStatus(bucket.status) }; } }; //#endregion export { EntryInfo };