{
  "id": "sqlstate",
  "kind": "datatype",
  "status": "draft",
  "name": "SQLSTATE code",
  "doc": "Five-character code with which a SQL database reports the result of a statement, defined by the SQL standard. The first two characters are the class of the condition and the last three are the condition in that class. A code that ends in 000 is the generic code of its class. Codes use digits and capital letters. PostgreSQL, Db2, Oracle and ODBC and JDBC drivers return them, and database logs store them.",
  "is_pii": false,
  "categories": [
    "software"
  ],
  "langs": [
    "common"
  ],
  "classification": "categorical",
  "regexp": "^[0-9A-Z]{5}$",
  "examples": [
    {
      "value": "42601",
      "description": "syntax_error in PostgreSQL",
      "valid": true
    },
    {
      "value": "23505",
      "description": "unique_violation in PostgreSQL",
      "valid": true
    },
    {
      "value": "42P01",
      "description": "undefined_table in PostgreSQL",
      "valid": true
    },
    {
      "value": "40P01",
      "description": "deadlock_detected in PostgreSQL",
      "valid": true
    },
    {
      "value": "42p01",
      "description": "Lowercase letter",
      "valid": false
    }
  ],
  "links": [
    {
      "type": "doc",
      "url": "https://www.postgresql.org/docs/current/errcodes-appendix.html"
    }
  ],
  "translations": {
    "ru": {
      "name": "Код SQLSTATE"
    }
  },
  "quality": {
    "score": 80,
    "missing": [
      "mapping (Wikidata, Schema.org, ...)",
      "detector coverage"
    ]
  },
  "source": {
    "path": "data/datatypes/any/software/sqlstate.yaml",
    "url": "https://github.com/apicrafter/metacrafter-registry/blob/main/data/datatypes/any/software/sqlstate.yaml",
    "edit_url": "https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/any/software/sqlstate.yaml"
  },
  "urls": {
    "html": "https://registry.apicrafter.io/datatype/sqlstate",
    "json": "https://registry.apicrafter.io/api/v1/datatypes/sqlstate.json"
  }
}