{
  "$schema": "../../schemas/types.schema.json",
  "namespace": "database",
  "version": "1.0.0-draft.1",
  "types": [
    {
      "name": "database.Record",
      "kind": "handle",
      "purpose": "Execution-owned record; not serializable and exposes only these defined operations.",
      "methods": {
        "load": {
          "parameters": [
            {
              "name": "values",
              "type": "core.object",
              "required": true
            }
          ],
          "returns": "core.void",
          "purpose": "none; assign the supplied fields to pending record state.",
          "statementOnly": true
        },
        "remove": {
          "parameters": [
            {
              "name": "name",
              "type": "core.string",
              "required": true
            }
          ],
          "returns": "core.void",
          "purpose": "none; clear the named field's value in pending record state. Persist with save.",
          "statementOnly": true
        },
        "save": {
          "parameters": [],
          "returns": "core.void",
          "purpose": "none; persist pending state in the execution transaction.",
          "statementOnly": true
        },
        "data": {
          "parameters": [],
          "returns": "core.object",
          "purpose": "Plain object containing the loaded projection, recursively converted to data.",
          "statementOnly": false
        }
      }
    },
    {
      "name": "database.RecordCursor",
      "kind": "handle",
      "purpose": "Execution-owned cursor; not serializable and exposes only these defined operations.",
      "iterableOf": "database.Record",
      "methods": {}
    },
    {
      "name": "database.Query",
      "kind": "object",
      "purpose": "Read query over declared Collections and projections.",
      "schema": {
        "$ref": "query.schema.json"
      }
    },
    {
      "name": "database.BulkUpdate",
      "kind": "object",
      "purpose": "One bulk change over matching base records.",
      "schema": {
        "$ref": "bulk-update.schema.json"
      }
    }
  ]
}
