@cocalc/database
Version:
CoCalc: code for working with our PostgreSQL database
21 lines (20 loc) • 842 B
TypeScript
import { PostgreSQL } from "../types";
export declare function numberRunningQuery(license_id: string): string;
export declare function number_of_running_projects_using_license(db: PostgreSQL, license_id: string): Promise<number>;
export declare function number_of_projects_with_license_applied(db: PostgreSQL, license_id: string): Promise<number>;
export declare function site_license_usage_stats(db: PostgreSQL): Promise<{
[license_id: string]: number;
}>;
export declare function projects_using_site_license(db: PostgreSQL, opts: {
license_id: string;
fields: string[];
cutoff?: Date;
limit?: number;
truncate?: number;
}): Promise<{
[field: string]: any;
}[]>;
export declare function number_of_projects_using_site_license(db: PostgreSQL, opts: {
license_id: string;
cutoff?: Date;
}): Promise<number>;