Server IP : 162.213.251.212 / Your IP : 3.12.150.240 [ Web Server : LiteSpeed System : Linux business55.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : allssztx ( 535) PHP Version : 8.1.31 Disable Function : NONE Domains : 1 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /proc/self/root/home/allssztx/needapair.com/node_modules/mongodb/src/operations/ |
Upload File : |
import type { Document } from '../bson'; import type { Db } from '../db'; import type { Server } from '../sdam/server'; import type { ClientSession } from '../sessions'; import { CommandOperation, type CommandOperationOptions } from './command'; import { Aspect, defineAspects } from './operation'; /** @public */ export interface DbStatsOptions extends CommandOperationOptions { /** Divide the returned sizes by scale value. */ scale?: number; } /** @internal */ export class DbStatsOperation extends CommandOperation<Document> { override options: DbStatsOptions; constructor(db: Db, options: DbStatsOptions) { super(db, options); this.options = options; } override get commandName() { return 'dbStats' as const; } override async execute(server: Server, session: ClientSession | undefined): Promise<Document> { const command: Document = { dbStats: true }; if (this.options.scale != null) { command.scale = this.options.scale; } return await super.executeCommand(server, session, command); } } defineAspects(DbStatsOperation, [Aspect.READ_OPERATION]);