reduct-js
Version:
ReductStore Client SDK for Javascript/NodeJS/Typescript
46 lines (45 loc) • 1.15 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.EntryInfo = void 0;
/**
* Information about entry
*/
class EntryInfo {
constructor() {
/**
* Name of the entry
*/
this.name = "";
/**
* Number of blocks
*/
this.blockCount = 0n;
/**
* Number of records
*/
this.recordCount = 0n;
/**
* Size of stored data in the bucket in bytes
*/
this.size = 0n;
/**
* Unix timestamp of the oldest record in microseconds
*/
this.oldestRecord = 0n;
/**
* Unix timestamp of the latest record in microseconds
*/
this.latestRecord = 0n;
}
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),
};
}
}
exports.EntryInfo = EntryInfo;