summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/inspector/protocol/IndexedDB.json
blob: 0e984e4e8d684143a1d45ed2240dc75eb7488c52 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
{
    "domain": "IndexedDB",
    "featureGuard": "ENABLE(INDEXED_DATABASE)",
    "availability": "web",
    "types": [
        {
            "id": "DatabaseWithObjectStores",
            "type": "object",
            "description": "Database with an array of object stores.",
            "properties": [
                { "name": "name", "type": "string", "description": "Database name." },
                { "name": "version", "type": "number", "description": "Database version." },
                { "name": "objectStores", "type": "array", "items": { "$ref": "ObjectStore" }, "description": "Object stores in this database." }
            ]
        },
        {
            "id": "ObjectStore",
            "type": "object",
            "description": "Object store.",
            "properties": [
                { "name": "name", "type": "string", "description": "Object store name." },
                { "name": "keyPath", "$ref": "KeyPath", "description": "Object store key path." },
                { "name": "autoIncrement", "type": "boolean", "description": "If true, object store has auto increment flag set." },
                { "name": "indexes", "type": "array", "items": { "$ref": "ObjectStoreIndex" }, "description": "Indexes in this object store." }
            ]
        },
        {
            "id": "ObjectStoreIndex",
            "type": "object",
            "description": "Object store index.",
            "properties": [
                { "name": "name", "type": "string", "description": "Index name." },
                { "name": "keyPath", "$ref": "KeyPath", "description": "Index key path." },
                { "name": "unique", "type": "boolean", "description": "If true, index is unique." },
                { "name": "multiEntry", "type": "boolean", "description": "If true, index allows multiple entries for a key." }
            ]
        },
        {
            "id": "Key",
            "type": "object",
            "description": "Key.",
            "properties": [
                { "name": "type", "type": "string", "enum": ["number", "string", "date", "array"], "description": "Key type." },
                { "name": "number", "type": "number", "optional": true, "description": "Number value." },
                { "name": "string", "type": "string", "optional": true, "description": "String value." },
                { "name": "date", "type": "number", "optional": true, "description": "Date value." },
                { "name": "array", "type": "array", "optional": true, "items": { "$ref": "Key" }, "description": "Array value." }
            ]
        },
        {
            "id": "KeyRange",
            "type": "object",
            "description": "Key range.",
            "properties": [
                { "name": "lower", "$ref": "Key", "optional": true, "description": "Lower bound." },
                { "name": "upper", "$ref": "Key", "optional": true, "description": "Upper bound." },
                { "name": "lowerOpen", "type": "boolean", "description": "If true lower bound is open." },
                { "name": "upperOpen", "type": "boolean", "description": "If true upper bound is open." }
            ]
        },
        {
            "id": "DataEntry",
            "type": "object",
            "description": "Data entry.",
            "properties": [
                { "name": "key", "$ref": "Runtime.RemoteObject", "description": "Key." },
                { "name": "primaryKey", "$ref": "Runtime.RemoteObject", "description": "Primary key." },
                { "name": "value", "$ref": "Runtime.RemoteObject", "description": "Value." }
            ]
        },
        {
            "id": "KeyPath",
            "type": "object",
            "description": "Key path.",
            "properties": [
                { "name": "type", "type": "string", "enum": ["null", "string", "array"], "description": "Key path type." },
                { "name": "string", "type": "string", "optional": true, "description": "String value." },
                { "name": "array", "type": "array", "optional": true, "items": { "type": "string" }, "description": "Array value." }
            ]
        }
    ],
    "commands": [
        {
            "name": "enable",
            "description": "Enables events from backend."
        },
        {
            "name": "disable",
            "description": "Disables events from backend."
        },
        {
            "name": "requestDatabaseNames",
            "async": true,
            "parameters": [
                { "name": "securityOrigin", "type": "string", "description": "Security origin." }
            ],
            "returns": [
                { "name": "databaseNames", "type": "array", "items": { "type": "string" }, "description": "Database names for origin." }
            ],
            "description": "Requests database names for given security origin."
        },
        {
            "name": "requestDatabase",
            "async": true,
            "parameters": [
                { "name": "securityOrigin", "type": "string", "description": "Security origin." },
                { "name": "databaseName", "type": "string", "description": "Database name." }
            ],
            "returns": [
                { "name": "databaseWithObjectStores", "$ref": "DatabaseWithObjectStores", "description": "Database with an array of object stores." }
            ],
            "description": "Requests database with given name in given frame."
        },
        {
            "name": "requestData",
            "async": true,
            "parameters": [
                { "name": "securityOrigin", "type": "string", "description": "Security origin." },
                { "name": "databaseName", "type": "string", "description": "Database name." },
                { "name": "objectStoreName", "type": "string", "description": "Object store name." },
                { "name": "indexName", "type": "string", "description": "Index name, empty string for object store data requests." },
                { "name": "skipCount", "type": "integer", "description": "Number of records to skip." },
                { "name": "pageSize", "type": "integer", "description": "Number of records to fetch." },
                { "name": "keyRange", "$ref": "KeyRange", "optional": true, "description": "Key range." }
            ],
            "returns": [
                { "name": "objectStoreDataEntries", "type": "array", "items": { "$ref": "DataEntry" }, "description": "Array of object store data entries." },
                { "name": "hasMore", "type": "boolean", "description": "If true, there are more entries to fetch in the given range." }
            ],
            "description": "Requests data from object store or index."
        },
        {
            "name": "clearObjectStore",
            "async": true,
            "parameters": [
                { "name": "securityOrigin", "type": "string", "description": "Security origin." },
                { "name": "databaseName", "type": "string", "description": "Database name." },
                { "name": "objectStoreName", "type": "string", "description": "Object store name." }
            ],
            "returns": [
            ],
            "description": "Clears all entries from an object store."
        }
    ]
}