DatabaseTypeAnnotation 数据库存储类型
数据库存储类型
1. 结构声明
- TS Declaration
 - JSON Schema
 
class DatabaseTypeAnnotation extends BaseNode {
    typeName: string;
    arguments?: Map<string, string>;
}
{
    "type": "object",
    "properties": {
        "composedBy": {
            "type": "array",
            "items": {
                "type": "string"
            }
        },
        "changedTime": {
            "$ref": "#/definitions/long"
        },
        "typeName": {
            "type": "string"
        },
        "arguments": {
            "type": "object",
            "properties": {
                "size": {
                    "type": "number"
                }
            },
            "required": [
                "size"
            ],
            "additionalProperties": false
        }
    },
    "required": [
        "typeName"
    ],
    "additionalProperties": false
}
2. 节点示例
(1) 示例
AST 如下:
- JSON
 - YAML
 
{
    "concept": "DatabaseTypeAnnotation",
    "typeName": "decimal",
    "arguments": {
        "precision": "31"
    }
}
concept: DatabaseTypeAnnotation
typeName: decimal
arguments:
  precision: "31"
对应的代码如下:
- 文本化 NASL
 - Natural TS
 
@DatabaseTypeAnnotation(
    typeName = "decimal",
    arguments = [ "precision" -> "31" ],
)