@culpritsql/plan-viewer 0.0.0 → 0.5.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +38 -3
- package/pkg/ActualSummary.d.ts +10 -0
- package/pkg/ActualSummary.js +72 -0
- package/pkg/DeadlockGraph.d.ts +9 -0
- package/pkg/DeadlockGraph.js +135 -0
- package/pkg/DeadlockViewer.d.ts +20 -0
- package/pkg/DeadlockViewer.js +62 -0
- package/pkg/DocdbWork.d.ts +7 -0
- package/pkg/DocdbWork.js +37 -0
- package/pkg/NodeDetails.d.ts +15 -0
- package/pkg/NodeDetails.js +161 -0
- package/pkg/OpIcon.d.ts +9 -0
- package/pkg/OpIcon.js +54 -0
- package/pkg/PlanAssessmentNotes.d.ts +3 -0
- package/pkg/PlanAssessmentNotes.js +8 -0
- package/pkg/PlanCanvas.d.ts +47 -0
- package/pkg/PlanCanvas.js +9 -0
- package/pkg/PlanDiagram.d.ts +47 -0
- package/pkg/PlanDiagram.js +534 -0
- package/pkg/PlanDiffViewer.d.ts +31 -0
- package/pkg/PlanDiffViewer.js +325 -0
- package/pkg/PlanInsights.d.ts +6 -0
- package/pkg/PlanInsights.js +100 -0
- package/pkg/PlanObjects.d.ts +7 -0
- package/pkg/PlanObjects.js +138 -0
- package/pkg/PlanOperations.d.ts +8 -0
- package/pkg/PlanOperations.js +114 -0
- package/pkg/PlanRaw.d.ts +4 -0
- package/pkg/PlanRaw.js +35 -0
- package/pkg/PlanSurface.d.ts +22 -0
- package/pkg/PlanSurface.js +66 -0
- package/pkg/PlanTypeSchema.d.ts +5 -0
- package/pkg/PlanTypeSchema.js +62 -0
- package/pkg/PlanView.d.ts +27 -0
- package/pkg/PlanView.js +160 -0
- package/pkg/PlanViewer.d.ts +30 -0
- package/pkg/PlanViewer.js +19 -0
- package/pkg/Prose.d.ts +4 -0
- package/pkg/Prose.js +6 -0
- package/pkg/Sql.d.ts +5 -0
- package/pkg/Sql.js +7 -0
- package/pkg/THIRD-PARTY-LICENSES.txt +9021 -0
- package/pkg/build-report.json +912 -0
- package/pkg/defaults.d.ts +29 -0
- package/pkg/defaults.js +438 -0
- package/pkg/host.d.ts +118 -0
- package/pkg/host.js +593 -0
- package/pkg/index.d.ts +22 -1
- package/pkg/index.js +21 -1
- package/pkg/models/Ability.d.ts +6 -0
- package/pkg/models/ActualSummary.d.ts +16 -0
- package/pkg/models/CachedStatementContext.d.ts +9 -0
- package/pkg/models/CachedStatementIdentity.d.ts +7 -0
- package/pkg/models/ChangeKind.d.ts +3 -0
- package/pkg/models/CleanupEvidence.d.ts +6 -0
- package/pkg/models/CollectionTarget.d.ts +6 -0
- package/pkg/models/CompilationMemory.d.ts +3 -0
- package/pkg/models/CompileHistory.d.ts +13 -0
- package/pkg/models/ConfiguredConnectionIdentity.d.ts +7 -0
- package/pkg/models/Connect.d.ts +22 -0
- package/pkg/models/ConnectionSecurityMode.d.ts +3 -0
- package/pkg/models/ConnectionSecuritySpec.d.ts +4 -0
- package/pkg/models/ConstraintValidation.d.ts +6 -0
- package/pkg/models/DatabaseIdentity.d.ts +5 -0
- package/pkg/models/DatabaseLocation.d.ts +3 -0
- package/pkg/models/DatabaseProduct.d.ts +6 -0
- package/pkg/models/Deadlock.d.ts +23 -0
- package/pkg/models/DeadlockFix.d.ts +16 -0
- package/pkg/models/DeadlockFixKind.d.ts +6 -0
- package/pkg/models/DeadlockPattern.d.ts +3 -0
- package/pkg/models/DeadlockProcess.d.ts +23 -0
- package/pkg/models/DeadlockResource.d.ts +12 -0
- package/pkg/models/DistributionPopulation.d.ts +3 -0
- package/pkg/models/DocdbMetrics.d.ts +7 -0
- package/pkg/models/Engine.d.ts +3 -0
- package/pkg/models/EngineAbilities.d.ts +46 -0
- package/pkg/models/EngineFacts.d.ts +28 -0
- package/pkg/models/EvidencePresentation.d.ts +4 -0
- package/pkg/models/ExecutionProtection.d.ts +3 -0
- package/pkg/models/Guess.d.ts +6 -0
- package/pkg/models/InsightArea.d.ts +6 -0
- package/pkg/models/LocalizedText.d.ts +4 -0
- package/pkg/models/LockHolder.d.ts +3 -0
- package/pkg/models/LogRateGovernanceReason.d.ts +7 -0
- package/pkg/models/Message.d.ts +4 -0
- package/pkg/models/MessageValue.d.ts +4 -0
- package/pkg/models/Metric.d.ts +10 -0
- package/pkg/models/MssqlCatalogIndexColumn.d.ts +3 -0
- package/pkg/models/MssqlCurrentTableType.d.ts +10 -0
- package/pkg/models/MssqlCurrentTypeColumn.d.ts +7 -0
- package/pkg/models/MssqlCurrentTypeIndex.d.ts +4 -0
- package/pkg/models/MssqlCurrentTypeModule.d.ts +4 -0
- package/pkg/models/MssqlCurrentTypeParameter.d.ts +3 -0
- package/pkg/models/MssqlCurrentTypeSchema.d.ts +11 -0
- package/pkg/models/MssqlCurrentTypeSchemaStatus.d.ts +3 -0
- package/pkg/models/MssqlIndexParentKind.d.ts +3 -0
- package/pkg/models/MssqlObjectIdentity.d.ts +7 -0
- package/pkg/models/NativeIdentity.d.ts +3 -0
- package/pkg/models/NativePlanIdentity.d.ts +4 -0
- package/pkg/models/NativeQueryIdentity.d.ts +3 -0
- package/pkg/models/NativeReadContext.d.ts +13 -0
- package/pkg/models/NodeKind.d.ts +3 -0
- package/pkg/models/NodeMatch.d.ts +3 -0
- package/pkg/models/NodeRuntime.d.ts +28 -0
- package/pkg/models/PageServerReadAvailability.d.ts +3 -0
- package/pkg/models/PageServerReadStatistics.d.ts +8 -0
- package/pkg/models/PageServerReadSummary.d.ts +19 -0
- package/pkg/models/PartitionTail.d.ts +6 -0
- package/pkg/models/Plan.d.ts +11 -0
- package/pkg/models/PlanAccessRows.d.ts +13 -0
- package/pkg/models/PlanAutomaticIndex.d.ts +3 -0
- package/pkg/models/PlanChange.d.ts +17 -0
- package/pkg/models/PlanChangedColumn.d.ts +3 -0
- package/pkg/models/PlanConversion.d.ts +4 -0
- package/pkg/models/PlanConversionIssue.d.ts +3 -0
- package/pkg/models/PlanCurrentTypeSchemaView.d.ts +6 -0
- package/pkg/models/PlanDiff.d.ts +13 -0
- package/pkg/models/PlanExecutionMode.d.ts +3 -0
- package/pkg/models/PlanFacts.d.ts +36 -0
- package/pkg/models/PlanHistory.d.ts +6 -0
- package/pkg/models/PlanHistoryKind.d.ts +3 -0
- package/pkg/models/PlanIndexColumns.d.ts +3 -0
- package/pkg/models/PlanIndexHint.d.ts +3 -0
- package/pkg/models/PlanInsight.d.ts +44 -0
- package/pkg/models/PlanInsightShare.d.ts +3 -0
- package/pkg/models/PlanInsights.d.ts +8 -0
- package/pkg/models/PlanKind.d.ts +3 -0
- package/pkg/models/PlanMeasurementRef.d.ts +3 -0
- package/pkg/models/PlanMemoryGrantFeedback.d.ts +15 -0
- package/pkg/models/PlanMemoryGrantFeedbackIssue.d.ts +3 -0
- package/pkg/models/PlanMemoryGrantFeedbackState.d.ts +3 -0
- package/pkg/models/PlanNode.d.ts +7 -0
- package/pkg/models/PlanNodeFacts.d.ts +63 -0
- package/pkg/models/PlanOperatorView.d.ts +5 -0
- package/pkg/models/PlanPageServerIo.d.ts +16 -0
- package/pkg/models/PlanPageServerIoIssue.d.ts +4 -0
- package/pkg/models/PlanPageServerIoView.d.ts +7 -0
- package/pkg/models/PlanPageServerMetric.d.ts +3 -0
- package/pkg/models/PlanParameter.d.ts +10 -0
- package/pkg/models/PlanParameterComparison.d.ts +3 -0
- package/pkg/models/PlanParameterContext.d.ts +15 -0
- package/pkg/models/PlanParameterIssue.d.ts +3 -0
- package/pkg/models/PlanParameterUse.d.ts +4 -0
- package/pkg/models/PlanParameterUseKind.d.ts +3 -0
- package/pkg/models/PlanParameterValueState.d.ts +3 -0
- package/pkg/models/PlanParentRelationship.d.ts +3 -0
- package/pkg/models/PlanRegion.d.ts +7 -0
- package/pkg/models/PlanSampleSource.d.ts +6 -0
- package/pkg/models/PlanScanCompletion.d.ts +8 -0
- package/pkg/models/PlanScanThread.d.ts +3 -0
- package/pkg/models/PlanTemporaryTableUse.d.ts +7 -0
- package/pkg/models/PlanVariant.d.ts +23 -0
- package/pkg/models/PlanView.d.ts +9 -0
- package/pkg/models/PlanWarning.d.ts +3 -0
- package/pkg/models/PlanningStep.d.ts +7 -0
- package/pkg/models/ProductFacts.d.ts +11 -0
- package/pkg/models/QueryCosts.d.ts +62 -0
- package/pkg/models/QueryStat.d.ts +69 -0
- package/pkg/models/QueryTrend.d.ts +7 -0
- package/pkg/models/QueryVariantFamily.d.ts +9 -0
- package/pkg/models/QueryWaitCoverage.d.ts +8 -0
- package/pkg/models/ReadUnit.d.ts +7 -0
- package/pkg/models/Refusal.d.ts +7 -0
- package/pkg/models/RelationalInput.d.ts +5 -0
- package/pkg/models/RelationalInputKind.d.ts +3 -0
- package/pkg/models/RelationalInputProvenance.d.ts +3 -0
- package/pkg/models/RequestEvidence.d.ts +7 -0
- package/pkg/models/RetainedPlanProvenance.d.ts +11 -0
- package/pkg/models/RuntimeDistribution.d.ts +16 -0
- package/pkg/models/RuntimeDistributionIssue.d.ts +3 -0
- package/pkg/models/RuntimeDistributionOrigin.d.ts +3 -0
- package/pkg/models/RuntimeDuration.d.ts +3 -0
- package/pkg/models/RuntimeHistogramBucket.d.ts +8 -0
- package/pkg/models/RuntimeQuantile.d.ts +4 -0
- package/pkg/models/Scenario.d.ts +11 -0
- package/pkg/models/ScenarioKind.d.ts +3 -0
- package/pkg/models/SessionAction.d.ts +6 -0
- package/pkg/models/SessionIdFormat.d.ts +6 -0
- package/pkg/models/Severity.d.ts +3 -0
- package/pkg/models/SharedResourceIdentity.d.ts +11 -0
- package/pkg/models/SharedResourceKind.d.ts +3 -0
- package/pkg/models/SourcePartition.d.ts +8 -0
- package/pkg/models/Spread.d.ts +18 -0
- package/pkg/models/SqlSyntax.d.ts +6 -0
- package/pkg/models/StatementMetrics.d.ts +32 -0
- package/pkg/models/StatementOrigin.d.ts +6 -0
- package/pkg/models/StatementTemporaryWork.d.ts +3 -0
- package/pkg/models/StatisticsFreshness.d.ts +3 -0
- package/pkg/models/TriggerTiming.d.ts +3 -0
- package/pkg/models/Unit.d.ts +3 -0
- package/pkg/models/WaitClass.d.ts +3 -0
- package/pkg/models/WaitMechanism.d.ts +4 -0
- package/pkg/models/WaitSampling.d.ts +3 -0
- package/pkg/models/WaitStat.d.ts +4 -0
- package/pkg/models/WorkerSkew.d.ts +3 -0
- package/pkg/models/WriteLog.d.ts +7 -0
- package/pkg/models/WriteRows.d.ts +7 -0
- package/pkg/styles.css +3463 -0
- package/pkg/types.d.ts +29 -0
- package/pkg/types.js +1 -0
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Which native evidence can establish cleanup retention, independently of SQL grammar or engine identity.
|
|
5
|
+
*/
|
|
6
|
+
export type CleanupEvidence = "logged-and-versioned-transactions" | "transaction-horizons" | "shared-undo-read-views" | "file-lock" | "unavailable";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { ConfiguredConnectionIdentity } from "./ConfiguredConnectionIdentity.js";
|
|
3
|
+
import type { DatabaseIdentity } from "./DatabaseIdentity.js";
|
|
4
|
+
import type { SharedResourceIdentity } from "./SharedResourceIdentity.js";
|
|
5
|
+
|
|
6
|
+
export type CollectionTarget = { "scope": "database", "identity": DatabaseIdentity } | { "scope": "shared", "identity": SharedResourceIdentity } | { "scope": "configured-connection", "identity": ConfiguredConnectionIdentity };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { CompilationMemory } from "./CompilationMemory.js";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Exact compile totals for one retained Query Store entry. Query Store does not timestamp every compilation, so
|
|
6
|
+
* totals can be compared with windowed runs only when the entry's first compile falls inside that window and the
|
|
7
|
+
* native compilation population matches those runs. `within_window` records time qualification, not that scope proof.
|
|
8
|
+
*/
|
|
9
|
+
export type CompileHistory = { count: number, total_ms: number, first_at: string | null, last_at: string | null, within_window: boolean,
|
|
10
|
+
/**
|
|
11
|
+
* Retained per-compilation working memory, over this entry's own lifetime. Never a total or current allocation.
|
|
12
|
+
*/
|
|
13
|
+
memory?: CompilationMemory, };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { Engine } from "./Engine.js";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Frozen saved metadata only. This target establishes no database, replica, session or native member identity.
|
|
6
|
+
*/
|
|
7
|
+
export type ConfiguredConnectionIdentity = { id: string, route_revision: string, name: string, engine: Engine, };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* How a person connects to an engine: the file they choose, or what they paste and how Culprit reads it.
|
|
5
|
+
*/
|
|
6
|
+
export type Connect = {
|
|
7
|
+
/**
|
|
8
|
+
* The engine where a person picks it, with what else it serves: "MySQL / MariaDB".
|
|
9
|
+
*/
|
|
10
|
+
choice: string,
|
|
11
|
+
/**
|
|
12
|
+
* The database is a file on this computer (SQLite), chosen rather than pasted.
|
|
13
|
+
*/
|
|
14
|
+
file: boolean,
|
|
15
|
+
/**
|
|
16
|
+
* What to paste, or the path to type, as an example.
|
|
17
|
+
*/
|
|
18
|
+
example: string,
|
|
19
|
+
/**
|
|
20
|
+
* Message key: what Culprit reads, in a sentence.
|
|
21
|
+
*/
|
|
22
|
+
accepts: string, };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
|
|
3
|
+
export type ConnectionSecurityMode = { value: string, aliases: Array<string>, label: string, description: string, allows_plaintext: boolean, verifies_identity: boolean, certificate_options: boolean, allows_trust_certificate: boolean, ca_verifies_certificate: boolean, };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { ConnectionSecurityMode } from "./ConnectionSecurityMode.js";
|
|
3
|
+
|
|
4
|
+
export type ConnectionSecuritySpec = { modes: Array<ConnectionSecurityMode>, default_mode: string, local_default_mode: string, mode_option: string, mode_aliases: Array<string>, ca_option: string, ca_aliases: Array<string>, trust_certificate_option: string | null, hostname_option: string | null, };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* What a collected constraint issue means to the engine, independently of SQL grammar.
|
|
5
|
+
*/
|
|
6
|
+
export type ConstraintValidation = "optimizer-trust" | "check-exclusion" | "deferred" | "unsupported";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { DatabaseLocation } from "./DatabaseLocation.js";
|
|
3
|
+
import type { Engine } from "./Engine.js";
|
|
4
|
+
|
|
5
|
+
export type DatabaseIdentity = { engine: Engine, database: string, location: DatabaseLocation, incarnation: string | null, };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
|
|
3
|
+
export type DatabaseLocation = { "kind": "server", host: string, port: number, instance: string | null, } | { "kind": "socket", directory: string, port: number, } | { "kind": "file", path: string, } | { "kind": "unknown" };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The database product a provider identified. Product branding does not select an execution provider.
|
|
5
|
+
*/
|
|
6
|
+
export type DatabaseProduct = "mssql" | "postgres" | "timescale" | "yugabyte" | "mysql" | "mariadb" | "sqlite";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { DeadlockFix } from "./DeadlockFix.js";
|
|
3
|
+
import type { DeadlockPattern } from "./DeadlockPattern.js";
|
|
4
|
+
import type { DeadlockProcess } from "./DeadlockProcess.js";
|
|
5
|
+
import type { DeadlockResource } from "./DeadlockResource.js";
|
|
6
|
+
|
|
7
|
+
export type Deadlock = {
|
|
8
|
+
/**
|
|
9
|
+
* Stable for the same event: time plus participants.
|
|
10
|
+
*/
|
|
11
|
+
id: string,
|
|
12
|
+
/**
|
|
13
|
+
* When the engine detected it (RFC 3339 UTC), when known.
|
|
14
|
+
*/
|
|
15
|
+
at: string | null,
|
|
16
|
+
/**
|
|
17
|
+
* Where it came from: `system_health`, `InnoDB status`, `pasted`.
|
|
18
|
+
*/
|
|
19
|
+
source: string, processes: Array<DeadlockProcess>, resources: Array<DeadlockResource>, pattern: DeadlockPattern,
|
|
20
|
+
/**
|
|
21
|
+
* Tables involved, `schema.table`.
|
|
22
|
+
*/
|
|
23
|
+
objects: Array<string>, headline: string, explanation: string, fixes: Array<DeadlockFix>, };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { DeadlockFixKind } from "./DeadlockFixKind.js";
|
|
3
|
+
|
|
4
|
+
export type DeadlockFix = { title: string, detail: string,
|
|
5
|
+
/**
|
|
6
|
+
* Copy-only SQL; Culprit never runs it.
|
|
7
|
+
*/
|
|
8
|
+
sql: string | null,
|
|
9
|
+
/**
|
|
10
|
+
* A finding id that is the same fix, when the scan found it (e.g. `config:read-committed-snapshot`).
|
|
11
|
+
*/
|
|
12
|
+
finding: string | null,
|
|
13
|
+
/**
|
|
14
|
+
* Which advice it is, so a sentence can name it in its own words.
|
|
15
|
+
*/
|
|
16
|
+
kind: DeadlockFixKind | null, };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The advice a [`DeadlockFix`] gives.
|
|
5
|
+
*/
|
|
6
|
+
export type DeadlockFixKind = "skip-lookup" | "primary-key" | "write-lock" | "same-order" | "short-transactions" | "fewer-rows" | "parallel-plan" | "retry" | "read-committed-snapshot";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
|
|
3
|
+
export type DeadlockProcess = {
|
|
4
|
+
/**
|
|
5
|
+
* The engine's id for the participant (`process1a2b`, `(1)`, a Postgres pid).
|
|
6
|
+
*/
|
|
7
|
+
id: string,
|
|
8
|
+
/**
|
|
9
|
+
* The session (SPID, thread id, pid) when known.
|
|
10
|
+
*/
|
|
11
|
+
session: string | null, victim: boolean, statement: string | null,
|
|
12
|
+
/**
|
|
13
|
+
* Stored procedure or function the statement ran in.
|
|
14
|
+
*/
|
|
15
|
+
procedure: string | null, login: string | null, host: string | null, application: string | null, database: string | null, isolation: string | null,
|
|
16
|
+
/**
|
|
17
|
+
* The lock mode it was waiting for.
|
|
18
|
+
*/
|
|
19
|
+
wait_mode: string | null,
|
|
20
|
+
/**
|
|
21
|
+
* Transaction log the victim had written (SQL Server): bigger means more work rolled back.
|
|
22
|
+
*/
|
|
23
|
+
log_used: number | null, };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { LockHolder } from "./LockHolder.js";
|
|
3
|
+
|
|
4
|
+
export type DeadlockResource = { id: string,
|
|
5
|
+
/**
|
|
6
|
+
* `keylock`, `pagelock`, `objectlock`, `ridlock`, `exchangeEvent`, `RECORD`, `TABLE`, `transaction`.
|
|
7
|
+
*/
|
|
8
|
+
kind: string,
|
|
9
|
+
/**
|
|
10
|
+
* `schema.table`, when known.
|
|
11
|
+
*/
|
|
12
|
+
object: string | null, index: string | null, holders: Array<LockHolder>, waiters: Array<LockHolder>, };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Native DocDB work; requests, operations and storage rows are different from PostgreSQL pages or SQL result rows.
|
|
5
|
+
* Timings can overlap and must not be turned into exclusive shares of execution time.
|
|
6
|
+
*/
|
|
7
|
+
export type DocdbMetrics = { read_requests: number | null, write_requests: number | null, read_operations: number | null, write_operations: number | null, rows_scanned: number | null, rows_returned: number | null, read_ms: number | null, write_ms: number | null, wait_ms: number | null, catalog_ms: number | null, retries: number | null, conflict_retries: number | null, read_restarts: number | null, obsolete_rows_scanned: number | null, seeks: number | null, nexts: number | null, prevs: number | null, };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* What an engine can answer (see [`Engine::abilities`]).
|
|
5
|
+
*/
|
|
6
|
+
export type EngineAbilities = {
|
|
7
|
+
/**
|
|
8
|
+
* Sessions, blocking and the Live view.
|
|
9
|
+
*/
|
|
10
|
+
sessions: boolean,
|
|
11
|
+
/**
|
|
12
|
+
* Sampling what the server waits on right now.
|
|
13
|
+
*/
|
|
14
|
+
wait_sample: boolean,
|
|
15
|
+
/**
|
|
16
|
+
* Deadlocks it records (graphs or a counter).
|
|
17
|
+
*/
|
|
18
|
+
deadlocks: boolean,
|
|
19
|
+
/**
|
|
20
|
+
* Running a statement once and reporting what each step actually did (rows, timings).
|
|
21
|
+
*/
|
|
22
|
+
measures_runs: boolean,
|
|
23
|
+
/**
|
|
24
|
+
* Row and cost estimates in its plans.
|
|
25
|
+
*/
|
|
26
|
+
plan_estimates: boolean,
|
|
27
|
+
/**
|
|
28
|
+
* Statements that change data, from the editor.
|
|
29
|
+
*/
|
|
30
|
+
writes: boolean,
|
|
31
|
+
/**
|
|
32
|
+
* Two periods of statement history to compare (What changed).
|
|
33
|
+
*/
|
|
34
|
+
periods: boolean,
|
|
35
|
+
/**
|
|
36
|
+
* The actual plan of a statement's most recent run, kept by the engine (SQL Server 2019+).
|
|
37
|
+
*/
|
|
38
|
+
last_actual_plan: boolean,
|
|
39
|
+
/**
|
|
40
|
+
* Live per-step counters of a running statement, sent every time (SQL Server); elsewhere the plan only when asked.
|
|
41
|
+
*/
|
|
42
|
+
operator_progress: boolean,
|
|
43
|
+
/**
|
|
44
|
+
* A sign-in: a password, a token. A file opened from disk takes none.
|
|
45
|
+
*/
|
|
46
|
+
sign_in: boolean, };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { CleanupEvidence } from "./CleanupEvidence.js";
|
|
3
|
+
import type { Connect } from "./Connect.js";
|
|
4
|
+
import type { ConnectionSecuritySpec } from "./ConnectionSecuritySpec.js";
|
|
5
|
+
import type { ConstraintValidation } from "./ConstraintValidation.js";
|
|
6
|
+
import type { EngineAbilities } from "./EngineAbilities.js";
|
|
7
|
+
import type { EvidencePresentation } from "./EvidencePresentation.js";
|
|
8
|
+
import type { PartitionTail } from "./PartitionTail.js";
|
|
9
|
+
import type { ProductFacts } from "./ProductFacts.js";
|
|
10
|
+
import type { Refusal } from "./Refusal.js";
|
|
11
|
+
import type { SessionAction } from "./SessionAction.js";
|
|
12
|
+
import type { SessionIdFormat } from "./SessionIdFormat.js";
|
|
13
|
+
import type { SqlSyntax } from "./SqlSyntax.js";
|
|
14
|
+
import type { StatementMetrics } from "./StatementMetrics.js";
|
|
15
|
+
import type { WaitSampling } from "./WaitSampling.js";
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Everything the app needs to know about an engine without a connection: written to `app/src/gen/engines.json`.
|
|
19
|
+
*/
|
|
20
|
+
export type EngineFacts = { default_port: number | null, evidence_presentation: EvidencePresentation, partition_tail: PartitionTail, label: string, products: Array<ProductFacts>, abilities: EngineAbilities, session_actions: Array<SessionAction>, session_id_format: SessionIdFormat, waiting_state: string, connect: Connect,
|
|
21
|
+
/**
|
|
22
|
+
* Message keys: what a scan of it can't establish.
|
|
23
|
+
*/
|
|
24
|
+
limitations: Array<string>,
|
|
25
|
+
/**
|
|
26
|
+
* The reason for every ability it lacks, by ability.
|
|
27
|
+
*/
|
|
28
|
+
refusals: { [key in string]: Refusal }, sql_syntax: SqlSyntax, statement_metrics: StatementMetrics, constraint_validation: ConstraintValidation, cleanup_evidence: CleanupEvidence, integrity_history_note: string | null, wait_sampling: WaitSampling | null, connection_security: ConnectionSecuritySpec | null, };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { StatisticsFreshness } from "./StatisticsFreshness.js";
|
|
3
|
+
|
|
4
|
+
export type EvidencePresentation = { storage_about: string, storage_untimed: string, health_empty: string, generic_plan_context: string, statistics_freshness: StatisticsFreshness, statistics_absence_known: boolean, workload_windowed_by_default: boolean, deadlock_time_window: boolean, retained_actual_plans: boolean, };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* What kind of change fixes it, for grouping and icons.
|
|
5
|
+
*/
|
|
6
|
+
export type InsightArea = "index" | "query" | "statistics" | "memory" | "parallelism" | "server";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A source-native reason for log-rate governance. These historical waits do not identify a current component,
|
|
5
|
+
* its pending bytes, a particular request, or the cause of an application's current delay.
|
|
6
|
+
*/
|
|
7
|
+
export type LogRateGovernanceReason = "page-server-log-apply" | "replica-log-apply" | "log-service-destage" | "log-storage-destage" | "geo-replica-log-apply" | "page-server-checkpoint" | "migration-target-log-apply";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { MessageValue } from "./MessageValue.js";
|
|
3
|
+
|
|
4
|
+
export type Message = { "kind": "text", text: string, } | { "kind": "catalog", key: string, arguments: { [key in string]: MessageValue }, } | { "kind": "sequence", messages: Array<Message>, separator: string, };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { Message } from "./Message.js";
|
|
3
|
+
|
|
4
|
+
export type MessageValue = { "kind": "text", "value": string } | { "kind": "number", "value": number } | { "kind": "count", "value": number } | { "kind": "duration", "value": number } | { "kind": "bytes", "value": number } | { "kind": "percent", "value": number } | { "kind": "digits", "value": string } | { "kind": "date-span", "value": { from: string, to: string, } } | { "kind": "message", "value": Message };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { Unit } from "./Unit.js";
|
|
3
|
+
|
|
4
|
+
export type Metric = { label: string, value: number, unit: Unit, text: string | null,
|
|
5
|
+
/**
|
|
6
|
+
* What the metric is: the catalog key its label is said from (`check.stale_stats.metric.changes`). Code that
|
|
7
|
+
* looks for a metric finds it by this, never by its label, which is words in the reader's language. Empty for a
|
|
8
|
+
* metric said without one (a plugged-in check's).
|
|
9
|
+
*/
|
|
10
|
+
key?: string, };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { MssqlCurrentTypeColumn } from "./MssqlCurrentTypeColumn.js";
|
|
3
|
+
import type { MssqlCurrentTypeIndex } from "./MssqlCurrentTypeIndex.js";
|
|
4
|
+
import type { MssqlObjectIdentity } from "./MssqlObjectIdentity.js";
|
|
5
|
+
|
|
6
|
+
export type MssqlCurrentTableType = { schema_id: number, user_type_id: number, schema: string, name: string,
|
|
7
|
+
/**
|
|
8
|
+
* sys.table_types.type_table_object_id and the current backing object's native generation.
|
|
9
|
+
*/
|
|
10
|
+
backing_object: MssqlObjectIdentity, modified_without_offset: string, memory_optimized: boolean, columns: Array<MssqlCurrentTypeColumn>, indexes: Array<MssqlCurrentTypeIndex>, };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
|
|
3
|
+
export type MssqlCurrentTypeColumn = { column_id: number, name: string, user_type_id: number, system_type_id: number, type_schema: string, type_name: string,
|
|
4
|
+
/**
|
|
5
|
+
* Native bytes, including -1; never a character count inferred from a plan conversion target.
|
|
6
|
+
*/
|
|
7
|
+
max_length: number, precision: number, scale: number, nullable: boolean, identity: boolean, computed: boolean, collation: string | null, };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { MssqlCatalogIndexColumn } from "./MssqlCatalogIndexColumn.js";
|
|
3
|
+
|
|
4
|
+
export type MssqlCurrentTypeIndex = { index_id: number, name: string, type_code: number, native_type: string, unique: boolean, primary_key: boolean, unique_constraint: boolean, disabled: boolean, hypothetical: boolean, columns: Array<MssqlCatalogIndexColumn>, };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { MssqlObjectIdentity } from "./MssqlObjectIdentity.js";
|
|
3
|
+
|
|
4
|
+
export type MssqlCurrentTypeModule = { identity: MssqlObjectIdentity, schema: string, name: string, modified_without_offset: string, };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { MssqlCurrentTableType } from "./MssqlCurrentTableType.js";
|
|
3
|
+
import type { MssqlCurrentTypeModule } from "./MssqlCurrentTypeModule.js";
|
|
4
|
+
import type { MssqlCurrentTypeParameter } from "./MssqlCurrentTypeParameter.js";
|
|
5
|
+
import type { MssqlCurrentTypeSchemaStatus } from "./MssqlCurrentTypeSchemaStatus.js";
|
|
6
|
+
|
|
7
|
+
export type MssqlCurrentTypeSchema = {
|
|
8
|
+
/**
|
|
9
|
+
* Native UTC point at which this current catalog context was read, not the plan's compilation time.
|
|
10
|
+
*/
|
|
11
|
+
observed_at: string, status: MssqlCurrentTypeSchemaStatus, module: MssqlCurrentTypeModule | null, parameters: Array<MssqlCurrentTypeParameter>, types: Array<MssqlCurrentTableType>, };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
|
|
3
|
+
export type MssqlObjectIdentity = { database_id: number, object_id: number,
|
|
4
|
+
/**
|
|
5
|
+
* Native SQL Server datetime has no offset. No UTC instant is inferred from it.
|
|
6
|
+
*/
|
|
7
|
+
created_without_offset: string, };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { NativeQueryIdentity } from "./NativeQueryIdentity.js";
|
|
3
|
+
|
|
4
|
+
export type NativePlanIdentity = { plan_id: string, query: NativeQueryIdentity, qualifiers: { [key in string]: string }, };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { CollectionTarget } from "./CollectionTarget.js";
|
|
3
|
+
import type { SourcePartition } from "./SourcePartition.js";
|
|
4
|
+
|
|
5
|
+
export type NativeReadContext = { target: CollectionTarget, partition: SourcePartition,
|
|
6
|
+
/**
|
|
7
|
+
* Bounds of the retained native observations. They are not counter lifetimes or acquisition-cost measurements.
|
|
8
|
+
*/
|
|
9
|
+
observed_from: string, observed_until: string,
|
|
10
|
+
/**
|
|
11
|
+
* Native updateability observed on this connection. It grants no permission to execute a change.
|
|
12
|
+
*/
|
|
13
|
+
database_writable: boolean | null, };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { PlanPageServerIo } from "./PlanPageServerIo.js";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Runtime counters an operator reports beyond rows, executions and time. Every field is optional: engines report
|
|
6
|
+
* different subsets (Postgres has buffers but no CPU per operator, MySQL has neither).
|
|
7
|
+
*/
|
|
8
|
+
export type NodeRuntime = { cpu_ms: number | null,
|
|
9
|
+
/**
|
|
10
|
+
* Pages (SQL Server) or buffers (Postgres) read, from memory or disk.
|
|
11
|
+
*/
|
|
12
|
+
logical_reads: number | null,
|
|
13
|
+
/**
|
|
14
|
+
* The part of `logical_reads` that had to come from disk.
|
|
15
|
+
*/
|
|
16
|
+
physical_reads: number | null,
|
|
17
|
+
/**
|
|
18
|
+
* Native remote-page counters retain their own population and never become generic storage reads.
|
|
19
|
+
*/
|
|
20
|
+
page_server_io?: PlanPageServerIo,
|
|
21
|
+
/**
|
|
22
|
+
* Rows each worker produced for parallel operators; uneven numbers mean one worker did most of the work.
|
|
23
|
+
*/
|
|
24
|
+
thread_rows: Array<number>,
|
|
25
|
+
/**
|
|
26
|
+
* Pages written to and read back from tempdb / temp files: the operator ran out of memory.
|
|
27
|
+
*/
|
|
28
|
+
spill_pages: number | null, };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { PageServerReadAvailability } from "./PageServerReadAvailability.js";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Statistics in 8-KiB pages. Native fragment averages/deviations preserve float precision and last/min/max
|
|
6
|
+
* preserve bigint. A separately tagged derived summary admits only its same-plan population's supported subset.
|
|
7
|
+
*/
|
|
8
|
+
export type PageServerReadStatistics = { availability: PageServerReadAvailability, average_pages: number | null, last_pages: string | null, minimum_pages: string | null, maximum_pages: string | null, standard_deviation_pages: number | null, };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { NativeIdentity } from "./NativeIdentity.js";
|
|
3
|
+
import type { PageServerReadStatistics } from "./PageServerReadStatistics.js";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* A scan retains per-plan statistics within its selected execution group/window. It never averages plans or
|
|
7
|
+
* replica groups. Multiple native fragments authorize no representative last or pooled standard deviation.
|
|
8
|
+
*/
|
|
9
|
+
export type PageServerReadSummary = { "kind": "native-fragment",
|
|
10
|
+
/**
|
|
11
|
+
* Original native readers retain this identity. Sharing removes lookup authority while preserving
|
|
12
|
+
* independently valid statistics; it never creates a new original runtime reference.
|
|
13
|
+
*/
|
|
14
|
+
native: NativeIdentity | null, executions: string, statistics: PageServerReadStatistics, } | { "kind": "derived", native_fragments: string, executions: string,
|
|
15
|
+
/**
|
|
16
|
+
* None means the existing plan summary contains different native execution outcomes. It authorizes
|
|
17
|
+
* no combined remote-read statistic; the original fragments remain independently readable.
|
|
18
|
+
*/
|
|
19
|
+
execution_type: string | null, statistics: PageServerReadStatistics, };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Whether a finite last boundary establishes a finite overall partition range.
|
|
5
|
+
*/
|
|
6
|
+
export type PartitionTail = "from-catalog" | "unbounded" | "unsupported" | "unknown";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { Engine } from "./Engine.js";
|
|
3
|
+
import type { PlanFacts } from "./PlanFacts.js";
|
|
4
|
+
import type { PlanIndexHint } from "./PlanIndexHint.js";
|
|
5
|
+
import type { PlanInsights } from "./PlanInsights.js";
|
|
6
|
+
import type { PlanKind } from "./PlanKind.js";
|
|
7
|
+
import type { PlanNode } from "./PlanNode.js";
|
|
8
|
+
import type { PlanView } from "./PlanView.js";
|
|
9
|
+
import type { PlanWarning } from "./PlanWarning.js";
|
|
10
|
+
|
|
11
|
+
export type Plan = { engine: Engine, kind: PlanKind, statement: string | null, total_cost: number, root: PlanNode, warnings: Array<PlanWarning>, index_hints: Array<PlanIndexHint>, props: { [key in string]: string }, facts: PlanFacts, raw: string | null, insights?: PlanInsights, view?: PlanView, };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
|
|
3
|
+
export type PlanAccessRows = {
|
|
4
|
+
/**
|
|
5
|
+
* Native estimated rows accessed before the residual predicate, per operator execution.
|
|
6
|
+
*/
|
|
7
|
+
estimated_per_execution: number | null,
|
|
8
|
+
/**
|
|
9
|
+
* Native rows accessed across the same recorded executions/workers as the operator's actual output.
|
|
10
|
+
* All participating native counters must be present. This is neither an estimate fallback nor proof that
|
|
11
|
+
* the operator consumed the whole parameter, table or function result.
|
|
12
|
+
*/
|
|
13
|
+
actual_total: number | null, };
|