Zum Inhalt
HALOWERK

Technische Prüfungen & Formate

F TD2000 DOCUMENTS 15 / postgresql17 merge snapshot when cardinality atomic action result

Execute a resolved PostgreSQL17 MERGE over complete supplied source/target rows, ordered WHEN clauses and exact action expressions, including cardinality failure and statement rollback.. Compare the complete typed result SHA256.

POST https://detect.halowerk.com/v1/F-TD2000-DOCUMENTS-15/postgresql17-merge-snapshot-when-cardinality-atomic-action-result

Eingaben

Felder des veröffentlichten Eingabeschemas
FeldTypPflichtBeschreibung
artifactobjectJa
Vollständiges Eingabeschema anzeigen
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "artifact"
  ],
  "properties": {
    "artifact": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "sqlMerge"
      ],
      "properties": {
        "sqlMerge": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "data",
            "claim"
          ],
          "properties": {
            "data": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "source",
                "target",
                "join",
                "expressions",
                "clauses",
                "candidate_order",
                "unique_key"
              ],
              "properties": {
                "source": {
                  "$ref": "#/properties/artifact/%24defs/a"
                },
                "target": {
                  "$ref": "#/properties/artifact/%24defs/a"
                },
                "join": {
                  "const": "key_equality"
                },
                "expressions": {
                  "type": "array",
                  "items": {
                    "anyOf": [
                      {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "kind",
                          "id",
                          "value"
                        ],
                        "properties": {
                          "kind": {
                            "const": "number"
                          },
                          "id": {
                            "$ref": "#/properties/artifact/%24defs/c"
                          },
                          "value": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": -1000000000,
                            "maximum": 1000000000
                          }
                        }
                      },
                      {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "kind",
                          "id",
                          "value"
                        ],
                        "properties": {
                          "kind": {
                            "const": "boolean"
                          },
                          "id": {
                            "$ref": "#/properties/artifact/%24defs/c"
                          },
                          "value": {
                            "type": [
                              "boolean",
                              "null"
                            ]
                          }
                        }
                      },
                      {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "kind",
                          "id",
                          "table",
                          "name"
                        ],
                        "properties": {
                          "kind": {
                            "const": "column"
                          },
                          "id": {
                            "$ref": "#/properties/artifact/%24defs/c"
                          },
                          "table": {
                            "enum": [
                              "source",
                              "target"
                            ]
                          },
                          "name": {
                            "enum": [
                              "key",
                              "value"
                            ]
                          }
                        }
                      },
                      {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "kind",
                          "id",
                          "operation",
                          "left",
                          "right"
                        ],
                        "properties": {
                          "kind": {
                            "const": "arithmetic"
                          },
                          "id": {
                            "$ref": "#/properties/artifact/%24defs/c"
                          },
                          "operation": {
                            "enum": [
                              "add",
                              "subtract"
                            ]
                          },
                          "left": {
                            "$ref": "#/properties/artifact/%24defs/c"
                          },
                          "right": {
                            "$ref": "#/properties/artifact/%24defs/c"
                          }
                        }
                      },
                      {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "kind",
                          "id",
                          "operation",
                          "left",
                          "right"
                        ],
                        "properties": {
                          "kind": {
                            "const": "comparison"
                          },
                          "id": {
                            "$ref": "#/properties/artifact/%24defs/c"
                          },
                          "operation": {
                            "enum": [
                              "eq",
                              "ne",
                              "lt",
                              "le"
                            ]
                          },
                          "left": {
                            "$ref": "#/properties/artifact/%24defs/c"
                          },
                          "right": {
                            "$ref": "#/properties/artifact/%24defs/c"
                          }
                        }
                      },
                      {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "kind",
                          "id",
                          "operation",
                          "left",
                          "right"
                        ],
                        "properties": {
                          "kind": {
                            "const": "logical"
                          },
                          "id": {
                            "$ref": "#/properties/artifact/%24defs/c"
                          },
                          "operation": {
                            "enum": [
                              "and",
                              "or"
                            ]
                          },
                          "left": {
                            "$ref": "#/properties/artifact/%24defs/c"
                          },
                          "right": {
                            "$ref": "#/properties/artifact/%24defs/c"
                          }
                        }
                      },
                      {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "kind",
                          "id",
                          "argument"
                        ],
                        "properties": {
                          "kind": {
                            "enum": [
                              "is_null",
                              "not"
                            ]
                          },
                          "id": {
                            "$ref": "#/properties/artifact/%24defs/c"
                          },
                          "argument": {
                            "$ref": "#/properties/artifact/%24defs/c"
                          }
                        }
                      }
                    ]
                  },
                  "maxItems": 64
                },
                "clauses": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "match",
                      "condition",
                      "action"
                    ],
                    "properties": {
                      "match": {
                        "enum": [
                          "matched",
                          "not_matched_by_target",
                          "not_matched_by_source"
                        ]
                      },
                      "condition": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "minLength": 1,
                        "maxLength": 48,
                        "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$"
                      },
                      "action": {
                        "anyOf": [
                          {
                            "type": "object",
                            "additionalProperties": false,
                            "required": [
                              "kind"
                            ],
                            "properties": {
                              "kind": {
                                "enum": [
                                  "nothing",
                                  "delete"
                                ]
                              }
                            }
                          },
                          {
                            "type": "object",
                            "additionalProperties": false,
                            "required": [
                              "kind",
                              "key",
                              "value"
                            ],
                            "properties": {
                              "kind": {
                                "enum": [
                                  "insert",
                                  "update"
                                ]
                              },
                              "key": {
                                "$ref": "#/properties/artifact/%24defs/c"
                              },
                              "value": {
                                "$ref": "#/properties/artifact/%24defs/c"
                              }
                            }
                          }
                        ]
                      }
                    }
                  },
                  "minItems": 1,
                  "maxItems": 24
                },
                "candidate_order": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "source",
                      "target"
                    ],
                    "properties": {
                      "source": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "minLength": 1,
                        "maxLength": 48,
                        "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$"
                      },
                      "target": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "minLength": 1,
                        "maxLength": 48,
                        "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$"
                      }
                    }
                  },
                  "maxItems": 288
                },
                "unique_key": {
                  "type": "boolean"
                }
              }
            },
            "claim": {
              "type": [
                "string",
                "null"
              ],
              "minLength": 64,
              "maxLength": 64,
              "pattern": "^[0-9a-f]{64}$"
            }
          }
        }
      },
      "$defs": {
        "a": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "id",
              "key",
              "value"
            ],
            "properties": {
              "id": {
                "$ref": "#/properties/artifact/%24defs/c"
              },
              "key": {
                "type": [
                  "integer",
                  "null"
                ],
                "minimum": -1000000000,
                "maximum": 1000000000
              },
              "value": {
                "type": [
                  "integer",
                  "null"
                ],
                "minimum": -1000000000,
                "maximum": 1000000000
              }
            }
          },
          "maxItems": 16
        },
        "c": {
          "type": "string",
          "minLength": 1,
          "maxLength": 48,
          "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$"
        }
      }
    }
  }
}

Originalschema öffnen

Ergebnis & Dokumentation

Maschinenlesbare Dokumentation dieses Hubs

Quelle dieser Seite: der veröffentlichte HALOWERK-Katalog. Stand: 2026-11-01, 15:19 UTC.

Weitere Endpunkte dieses Hubs

Alle Endpunkte dieses Hubs →