@culpritsql/plans 0.0.0-stage → 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.
Files changed (120) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +153 -2
  3. package/package.json +46 -4
  4. package/pkg/THIRD-PARTY-LICENSES.txt +9021 -0
  5. package/pkg/build-report.json +588 -0
  6. package/pkg/index.d.ts +26 -0
  7. package/pkg/index.js +37 -0
  8. package/pkg/models/ActualSummary.d.ts +16 -0
  9. package/pkg/models/CachedStatementContext.d.ts +9 -0
  10. package/pkg/models/CachedStatementIdentity.d.ts +7 -0
  11. package/pkg/models/ChangeKind.d.ts +3 -0
  12. package/pkg/models/CollectionStop.d.ts +3 -0
  13. package/pkg/models/CollectionTarget.d.ts +6 -0
  14. package/pkg/models/CompareContext.d.ts +12 -0
  15. package/pkg/models/ConfiguredConnectionIdentity.d.ts +7 -0
  16. package/pkg/models/DatabaseIdentity.d.ts +5 -0
  17. package/pkg/models/DatabaseLocation.d.ts +3 -0
  18. package/pkg/models/Deadlock.d.ts +23 -0
  19. package/pkg/models/DeadlockFix.d.ts +16 -0
  20. package/pkg/models/DeadlockFixKind.d.ts +6 -0
  21. package/pkg/models/DeadlockPattern.d.ts +3 -0
  22. package/pkg/models/DeadlockProcess.d.ts +23 -0
  23. package/pkg/models/DeadlockResource.d.ts +12 -0
  24. package/pkg/models/DeliveryProblem.d.ts +3 -0
  25. package/pkg/models/DocdbMetrics.d.ts +7 -0
  26. package/pkg/models/Engine.d.ts +3 -0
  27. package/pkg/models/Error.d.ts +5 -0
  28. package/pkg/models/ErrorCode.d.ts +3 -0
  29. package/pkg/models/ErrorDetail.d.ts +10 -0
  30. package/pkg/models/ExecutionProtection.d.ts +3 -0
  31. package/pkg/models/ExportFile.d.ts +7 -0
  32. package/pkg/models/ExportFormat.d.ts +3 -0
  33. package/pkg/models/ExportNote.d.ts +11 -0
  34. package/pkg/models/ExportOptions.d.ts +12 -0
  35. package/pkg/models/Guess.d.ts +6 -0
  36. package/pkg/models/InsightArea.d.ts +6 -0
  37. package/pkg/models/LexError.d.ts +6 -0
  38. package/pkg/models/LockHolder.d.ts +3 -0
  39. package/pkg/models/Metric.d.ts +10 -0
  40. package/pkg/models/MssqlCatalogIndexColumn.d.ts +3 -0
  41. package/pkg/models/MssqlCurrentTableType.d.ts +10 -0
  42. package/pkg/models/MssqlCurrentTypeColumn.d.ts +7 -0
  43. package/pkg/models/MssqlCurrentTypeIndex.d.ts +4 -0
  44. package/pkg/models/MssqlCurrentTypeModule.d.ts +4 -0
  45. package/pkg/models/MssqlCurrentTypeParameter.d.ts +3 -0
  46. package/pkg/models/MssqlCurrentTypeSchema.d.ts +11 -0
  47. package/pkg/models/MssqlCurrentTypeSchemaStatus.d.ts +3 -0
  48. package/pkg/models/MssqlIndexParentKind.d.ts +3 -0
  49. package/pkg/models/MssqlObjectIdentity.d.ts +7 -0
  50. package/pkg/models/NativeIdentity.d.ts +3 -0
  51. package/pkg/models/NativePlanIdentity.d.ts +4 -0
  52. package/pkg/models/NativeQueryIdentity.d.ts +3 -0
  53. package/pkg/models/NativeReadContext.d.ts +13 -0
  54. package/pkg/models/NodeKind.d.ts +3 -0
  55. package/pkg/models/NodeMatch.d.ts +3 -0
  56. package/pkg/models/NodeRuntime.d.ts +28 -0
  57. package/pkg/models/OutboxProblem.d.ts +3 -0
  58. package/pkg/models/Plan.d.ts +11 -0
  59. package/pkg/models/PlanAccessRows.d.ts +13 -0
  60. package/pkg/models/PlanAutomaticIndex.d.ts +3 -0
  61. package/pkg/models/PlanChange.d.ts +17 -0
  62. package/pkg/models/PlanChangedColumn.d.ts +3 -0
  63. package/pkg/models/PlanConversion.d.ts +4 -0
  64. package/pkg/models/PlanConversionIssue.d.ts +3 -0
  65. package/pkg/models/PlanCurrentTypeSchemaView.d.ts +6 -0
  66. package/pkg/models/PlanDiff.d.ts +13 -0
  67. package/pkg/models/PlanExecutionMode.d.ts +3 -0
  68. package/pkg/models/PlanFacts.d.ts +36 -0
  69. package/pkg/models/PlanIndexColumns.d.ts +3 -0
  70. package/pkg/models/PlanIndexHint.d.ts +3 -0
  71. package/pkg/models/PlanInsight.d.ts +44 -0
  72. package/pkg/models/PlanInsightShare.d.ts +3 -0
  73. package/pkg/models/PlanInsights.d.ts +8 -0
  74. package/pkg/models/PlanKind.d.ts +3 -0
  75. package/pkg/models/PlanMeasurementRef.d.ts +3 -0
  76. package/pkg/models/PlanMemoryGrantFeedback.d.ts +15 -0
  77. package/pkg/models/PlanMemoryGrantFeedbackIssue.d.ts +3 -0
  78. package/pkg/models/PlanMemoryGrantFeedbackState.d.ts +3 -0
  79. package/pkg/models/PlanNode.d.ts +7 -0
  80. package/pkg/models/PlanNodeFacts.d.ts +63 -0
  81. package/pkg/models/PlanOperatorView.d.ts +5 -0
  82. package/pkg/models/PlanPageServerIo.d.ts +16 -0
  83. package/pkg/models/PlanPageServerIoIssue.d.ts +4 -0
  84. package/pkg/models/PlanPageServerIoView.d.ts +7 -0
  85. package/pkg/models/PlanPageServerMetric.d.ts +3 -0
  86. package/pkg/models/PlanParameter.d.ts +10 -0
  87. package/pkg/models/PlanParameterComparison.d.ts +3 -0
  88. package/pkg/models/PlanParameterContext.d.ts +15 -0
  89. package/pkg/models/PlanParameterIssue.d.ts +3 -0
  90. package/pkg/models/PlanParameterUse.d.ts +4 -0
  91. package/pkg/models/PlanParameterUseKind.d.ts +3 -0
  92. package/pkg/models/PlanParameterValueState.d.ts +3 -0
  93. package/pkg/models/PlanParentRelationship.d.ts +3 -0
  94. package/pkg/models/PlanRegion.d.ts +7 -0
  95. package/pkg/models/PlanSampleSource.d.ts +6 -0
  96. package/pkg/models/PlanScanCompletion.d.ts +8 -0
  97. package/pkg/models/PlanScanThread.d.ts +3 -0
  98. package/pkg/models/PlanTemporaryTableUse.d.ts +7 -0
  99. package/pkg/models/PlanView.d.ts +9 -0
  100. package/pkg/models/PlanWarning.d.ts +3 -0
  101. package/pkg/models/RelationalInput.d.ts +5 -0
  102. package/pkg/models/RelationalInputKind.d.ts +3 -0
  103. package/pkg/models/RelationalInputProvenance.d.ts +3 -0
  104. package/pkg/models/RetainedPlanProvenance.d.ts +11 -0
  105. package/pkg/models/Scenario.d.ts +11 -0
  106. package/pkg/models/ScenarioKind.d.ts +3 -0
  107. package/pkg/models/Severity.d.ts +3 -0
  108. package/pkg/models/SharedResourceIdentity.d.ts +11 -0
  109. package/pkg/models/SharedResourceKind.d.ts +3 -0
  110. package/pkg/models/SourcePartition.d.ts +8 -0
  111. package/pkg/models/StatementOrigin.d.ts +6 -0
  112. package/pkg/models/StatementProblem.d.ts +4 -0
  113. package/pkg/models/StatisticsInfo.d.ts +3 -0
  114. package/pkg/models/TriggerTiming.d.ts +3 -0
  115. package/pkg/models/Unit.d.ts +3 -0
  116. package/pkg/models/WorkerSkew.d.ts +3 -0
  117. package/pkg/native/culprit_wasm.d.ts +49 -0
  118. package/pkg/native/culprit_wasm.js +378 -0
  119. package/pkg/native/culprit_wasm_bg.wasm +0 -0
  120. package/pkg/native/culprit_wasm_bg.wasm.d.ts +11 -0
@@ -0,0 +1,9 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { CachedStatementIdentity } from "./CachedStatementIdentity.js";
3
+ import type { StatementOrigin } from "./StatementOrigin.js";
4
+
5
+ export type CachedStatementContext = { identity: CachedStatementIdentity,
6
+ /**
7
+ * Native compilation database, not the batch text's nullable database or a session default.
8
+ */
9
+ database_id: number, query_hash: string | null, origin: StatementOrigin, monitoring_template_id: string | null, source_text_bytes: string | null, source_text_complete: boolean, };
@@ -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 CachedStatementIdentity = { plan_handle: string, sql_handle: string,
4
+ /**
5
+ * Native UTF-16 byte offsets, not Rust/JavaScript character offsets.
6
+ */
7
+ statement_start_bytes: number, statement_end_bytes: number, created_without_offset: string, plan_generation: 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 ChangeKind = "access" | "operator" | "added" | "removed" | "cost" | "rows" | "warning";
@@ -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 CollectionStop = "pending" | "cancelled" | "cancellation-unconfirmed" | "timed-out" | "page-limit" | "query-limit" | "byte-limit" | "row-limit" | "pressure" | "pressure-unavailable" | "source-changed" | "source-unavailable" | "source-not-ready" | "storage-failed" | "invalid-page" | "missing-definitions" | "retention-gap";
@@ -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,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 { StatisticsInfo } from "./StatisticsInfo.js";
3
+
4
+ /**
5
+ * What Culprit knows about the database the plans ran on, from its latest scan: optimizer statistics, so a scenario
6
+ * can say "statistics on orders are stale". Empty when the plans came from files.
7
+ */
8
+ export type CompareContext = { statistics: Array<StatisticsInfo>,
9
+ /**
10
+ * When the statistics were read (the scan time), so ages are honest.
11
+ */
12
+ taken_at: string | null, };
@@ -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,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,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,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 DeadlockPattern = "key-lookup" | "lock-conversion" | "opposite-order" | "lock-escalation" | "parallelism" | "cycle";
@@ -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,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 DeliveryProblem = "invalid-contract" | "destination-changed" | "fenced" | "conflict" | "integrity" | "capacity" | "storage" | "transport" | "not-ready" | "unsupported-schema";
@@ -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,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 Engine = "mssql" | "postgres" | "yugabyte" | "mysql" | "sqlite";
@@ -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 { ErrorCode } from "./ErrorCode.js";
3
+ import type { ErrorDetail } from "./ErrorDetail.js";
4
+
5
+ export type Error = { code: ErrorCode, message: string, hint: string | null, detail?: ErrorDetail, };
@@ -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 ErrorCode = "invalid_input" | "not_found" | "connection_failed" | "auth_failed" | "permission_denied" | "timeout" | "unsupported" | "query_failed" | "internal" | "confirmation_required";
@@ -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 { CollectionStop } from "./CollectionStop.js";
3
+ import type { DeliveryProblem } from "./DeliveryProblem.js";
4
+ import type { OutboxProblem } from "./OutboxProblem.js";
5
+ import type { StatementProblem } from "./StatementProblem.js";
6
+
7
+ /**
8
+ * Facts a caller can act on independently of a localized error message or hint.
9
+ */
10
+ export type ErrorDetail = { "statement": StatementProblem } | "actual-plan-statistics-unavailable" | "actual-plan-execution-population-unverified" | "actual-plan-identity-unverified" | "connection-security" | "session-action-changed" | { "collection-stopped": CollectionStop } | { "outbox": OutboxProblem } | { "delivery": DeliveryProblem };
@@ -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 ExecutionProtection = "read-only-transaction" | "rolled-back-transaction";
@@ -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 { ExportFormat } from "./ExportFormat.js";
3
+
4
+ /**
5
+ * A file to save or copy: a suggested name and the contents.
6
+ */
7
+ export type ExportFile = { name: string, contents: string, format: ExportFormat, };
@@ -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 ExportFormat = "markdown" | "html" | "native";
@@ -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
+
3
+ /**
4
+ * Something to say about a plan beyond Culprit's own summary, e.g. a plan insight: what it is, why it matters, how to
5
+ * fix it and which operator it is about. Rendered under the plan in every export format.
6
+ */
7
+ export type ExportNote = { title: string, detail: string | null, fix: string | null,
8
+ /**
9
+ * Plan node id, to mark the operator in the diagram.
10
+ */
11
+ node: 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 { ExportNote } from "./ExportNote.js";
3
+
4
+ export type ExportOptions = {
5
+ /**
6
+ * Replace literal values in SQL text, predicates and parameter values with placeholders. On unless asked.
7
+ */
8
+ redact: boolean,
9
+ /**
10
+ * Notes to include with the plan (e.g. insights). The insights engine fills these; exports render them.
11
+ */
12
+ notes: Array<ExportNote>, };
@@ -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
+ * How a step's cost rests on a default guess for a parameter ([`Plan::guess`]).
5
+ */
6
+ export type Guess = "rows" | "runs";
@@ -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,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
+ * Why text can't be lexed with confidence.
5
+ */
6
+ export type LexError = "unclosed-quote" | "unclosed-comment" | "unclosed-dollar-quote" | "executable-comment" | "unusual-whitespace";
@@ -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 LockHolder = { process: string, mode: string | null, };
@@ -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,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 MssqlCatalogIndexColumn = { index_column_id: number, column_id: number, name: string, key_ordinal: number, descending: boolean, included: boolean, };
@@ -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,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 MssqlCurrentTypeParameter = { parameter_id: number, name: string, user_type_id: number, };
@@ -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,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 MssqlCurrentTypeSchemaStatus = "available" | "restricted" | "not-collected" | "oversized" | "changed";
@@ -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 MssqlIndexParentKind = "table" | "indexed-view";
@@ -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,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 NativeIdentity = { id: string, qualifiers: { [key in string]: 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,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 NativeQueryIdentity = { query_id: string, 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,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 NodeKind = "scan" | "seek" | "lookup" | "join" | "sort" | "aggregate" | "spool" | "parallelism" | "modify" | "compute" | "other";
@@ -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 NodeMatch = { a: number, b: number, };
@@ -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,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 OutboxProblem = "locked" | "capacity" | "recovery-required" | "source-unconfirmed" | "integrity" | "unsupported-format" | "missing-capture" | "storage" | "invalid-limits";
@@ -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, };
@@ -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 PlanAutomaticIndex = { table: string, columns: Array<string>, };
@@ -0,0 +1,17 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { ChangeKind } from "./ChangeKind.js";
3
+
4
+ export type PlanChange = { kind: ChangeKind,
5
+ /**
6
+ * Node id in plan A, when the change involves a node there.
7
+ */
8
+ a: number | null,
9
+ /**
10
+ * Node id in plan B, when the change involves a node there.
11
+ */
12
+ b: number | null, title: string, detail: string | null,
13
+ /**
14
+ * How much this matters: roughly the share of plan cost involved, with changed data access ranked above other
15
+ * structural changes. Changes are sorted by it.
16
+ */
17
+ weight: number, };
@@ -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 PlanChangedColumn = { schema: string | null, table: string, column: string, data_type: 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 { PlanConversionIssue } from "./PlanConversionIssue.js";
3
+
4
+ export type PlanConversion = { issue: PlanConversionIssue, expression: 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 PlanConversionIssue = { "kind": "seek-plan" } | { "kind": "cardinality-estimate" } | { "kind": "other", "value": string };
@@ -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
+ * Words for the separately timed catalog context; the native bounded metadata stays on PlanFacts once.
5
+ */
6
+ export type PlanCurrentTypeSchemaView = { title: string, summary: string, limitations: Array<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 { NodeMatch } from "./NodeMatch.js";
3
+ import type { PlanChange } from "./PlanChange.js";
4
+ import type { PlanRegion } from "./PlanRegion.js";
5
+ import type { PlanWarning } from "./PlanWarning.js";
6
+ import type { Scenario } from "./Scenario.js";
7
+
8
+ /**
9
+ * Plan structure, measured timings and known optimizer costs. Missing costs are `None`; matching engine cost
10
+ * scales (`comparable`) do not establish that either plan recorded a cost. `matches` pairs corresponding operators,
11
+ * `regions` groups identical parts, and `scenarios` explains conditions that may account for structural differences.
12
+ */
13
+ export type PlanDiff = { headlines: Array<string>, cost_a: number | null, cost_b: number | null, cost_ratio: number | null, time_a_ms: number | null, time_b_ms: number | null, comparable: boolean, same_shape: boolean, changes: Array<PlanChange>, matches: Array<NodeMatch>, only_a: Array<number>, only_b: Array<number>, warnings_added: Array<PlanWarning>, warnings_removed: Array<PlanWarning>, regions: Array<PlanRegion>, scenarios: Array<Scenario>, };
@@ -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 PlanExecutionMode = { "kind": "row" } | { "kind": "batch" } | { "kind": "other", "value": string };
@@ -0,0 +1,36 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { DocdbMetrics } from "./DocdbMetrics.js";
3
+ import type { ExecutionProtection } from "./ExecutionProtection.js";
4
+ import type { MssqlCurrentTypeSchema } from "./MssqlCurrentTypeSchema.js";
5
+ import type { PlanChangedColumn } from "./PlanChangedColumn.js";
6
+ import type { PlanConversion } from "./PlanConversion.js";
7
+ import type { PlanMemoryGrantFeedback } from "./PlanMemoryGrantFeedback.js";
8
+ import type { PlanParameterContext } from "./PlanParameterContext.js";
9
+ import type { PlanSampleSource } from "./PlanSampleSource.js";
10
+ import type { RetainedPlanProvenance } from "./RetainedPlanProvenance.js";
11
+ import type { TriggerTiming } from "./TriggerTiming.js";
12
+
13
+ export type PlanFacts = {
14
+ /**
15
+ * Bounded type metadata observed when this plan was read. It describes the current catalog at its own clock,
16
+ * never the schema used at compilation, live input contents, parameter cardinality or a cause of the plan.
17
+ */
18
+ current_type_schema?: MssqlCurrentTypeSchema,
19
+ /**
20
+ * Retained native cache evidence. Read ownership is separate from the earlier execution's unknown population.
21
+ */
22
+ retained?: RetainedPlanProvenance,
23
+ /**
24
+ * Protection confirmed by the native provider for this measured execution. An imported or retained plan cannot
25
+ * establish how Culprit executed it, and therefore leaves this unknown.
26
+ */
27
+ execution_protection?: ExecutionProtection, constants_redacted?: boolean, estimated_cost_unavailable?: boolean, elapsed_ms?: number | null, cpu_ms?: number | null, planning_ms?: number | null, compile_ms?: number | null, compile_cpu_ms?: number | null, compile_memory_kb?: number | null, memory_desired_kb?: number | null, memory_requested_kb?: number | null, memory_granted_kb?: number | null, memory_max_used_kb?: number | null, memory_grant_wait_ms?: number | null,
28
+ /**
29
+ * Native feedback belongs to this selected plan; it establishes neither parameter causation nor current load.
30
+ */
31
+ memory_grant_feedback?: PlanMemoryGrantFeedback, udf_elapsed_ms?: number | null, udf_cpu_ms?: number | null, degree_of_parallelism?: number | null, used_threads?: number | null, cardinality_estimator?: number | null, cost_threshold_for_parallelism?: number | null, server_maxdop?: number | null, database_maxdop?: number | null, jit_time_ms?: number | null, trigger_timings: Array<TriggerTiming>, parallelism_blocker?: string | null, optimization_early_abort?: string | null, server_version?: string | null, flavor?: string | null, cost_basis?: string | null, generic_plan_reason?: string | null, statistics_maintenance?: string | null, compiled_parameters?: string | null,
32
+ /**
33
+ * Native parameter metadata from this selected plan, with value availability and a pre-redaction comparison.
34
+ * The plan's retained/execution provenance remains separate; this does not describe a workload population.
35
+ */
36
+ parameter_context?: PlanParameterContext, memory_grant_warning?: string | null, conversions: Array<PlanConversion>, changed_columns: Array<PlanChangedColumn>, query_hash?: string | null, query_identifier?: string | null, last_run_at?: string, sample_limit_rows?: number, virtual_indexes?: Array<string>, docdb?: DocdbMetrics, sample_source?: PlanSampleSource, };
@@ -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 PlanIndexColumns = { name: string, columns: Array<string>, hash_columns?: Array<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 PlanIndexHint = { table: string, equality: Array<string>, inequality: Array<string>, include: Array<string>, impact_pct: number, };