mirror of
https://github.com/darlinghq/darling-JavaScriptCore.git
synced 2025-04-14 04:40:19 +00:00
110 lines
4.9 KiB
JSON
110 lines
4.9 KiB
JSON
{
|
|
"domain": "Database",
|
|
"types": [
|
|
{
|
|
"id": "DatabaseId",
|
|
"type": "integer",
|
|
"description": "Unique identifier of Database object."
|
|
},
|
|
{
|
|
"id": "PrimaryColors",
|
|
"type": "string",
|
|
"enum": ["red", "green", "blue"]
|
|
},
|
|
{
|
|
"id": "ColorList",
|
|
"type": "array",
|
|
"items": { "$ref": "PrimaryColors" }
|
|
},
|
|
{
|
|
"id": "Error",
|
|
"type": "object",
|
|
"description": "Database error.",
|
|
"properties": [
|
|
{ "name": "message", "type": "string", "description": "Error message." },
|
|
{ "name": "code", "type": "integer", "description": "Error code." }
|
|
]
|
|
}
|
|
],
|
|
"commands": [
|
|
{
|
|
"name": "executeSQLSyncOptionalReturnValues",
|
|
"parameters": [
|
|
{ "name": "databaseId", "$ref": "DatabaseId" },
|
|
{ "name": "query", "type": "string" }
|
|
],
|
|
"returns": [
|
|
{ "name": "columnNames", "type": "array", "optional": true, "items": { "type": "string" } },
|
|
{ "name": "notes", "type": "string", "optional": true },
|
|
{ "name": "timestamp", "type": "number", "optional": true },
|
|
{ "name": "values", "type": "object", "optional": true },
|
|
{ "name": "payload", "type": "any", "optional": true },
|
|
{ "name": "databaseId", "$ref": "DatabaseId", "optional": true },
|
|
{ "name": "sqlError", "$ref": "Error", "optional": true },
|
|
{ "name": "screenColor", "$ref": "PrimaryColors", "optional": true },
|
|
{ "name": "alternateColors", "$ref": "ColorList", "optional": true },
|
|
{ "name": "printColor", "type": "string", "enum": ["cyan", "magenta", "yellow", "black"], "optional": true }
|
|
]
|
|
},
|
|
{
|
|
"name": "executeSQLAsyncOptionalReturnValues",
|
|
"async": true,
|
|
"parameters": [
|
|
{ "name": "databaseId", "$ref": "DatabaseId" },
|
|
{ "name": "query", "type": "string" }
|
|
],
|
|
"returns": [
|
|
{ "name": "columnNames", "type": "array", "optional": true, "items": { "type": "string" } },
|
|
{ "name": "notes", "type": "string", "optional": true },
|
|
{ "name": "timestamp", "type": "number", "optional": true },
|
|
{ "name": "values", "type": "object", "optional": true },
|
|
{ "name": "payload", "type": "any", "optional": true },
|
|
{ "name": "databaseId", "$ref": "DatabaseId", "optional": true },
|
|
{ "name": "sqlError", "$ref": "Error", "optional": true },
|
|
{ "name": "screenColor", "$ref": "PrimaryColors", "optional": true },
|
|
{ "name": "alternateColors", "$ref": "ColorList", "optional": true },
|
|
{ "name": "printColor", "type": "string", "enum": ["cyan", "magenta", "yellow", "black"], "optional": true }
|
|
]
|
|
},
|
|
{
|
|
"name": "executeSQLSync",
|
|
"parameters": [
|
|
{ "name": "databaseId", "$ref": "DatabaseId" },
|
|
{ "name": "query", "type": "string" }
|
|
],
|
|
"returns": [
|
|
{ "name": "columnNames", "type": "array", "items": { "type": "string" } },
|
|
{ "name": "notes", "type": "string" },
|
|
{ "name": "timestamp", "type": "number" },
|
|
{ "name": "values", "type": "object" },
|
|
{ "name": "payload", "type": "any" },
|
|
{ "name": "databaseId", "$ref": "DatabaseId" },
|
|
{ "name": "sqlError", "$ref": "Error" },
|
|
{ "name": "alternateColors", "$ref": "ColorList" },
|
|
{ "name": "screenColor", "$ref": "PrimaryColors" },
|
|
{ "name": "printColor", "type": "string", "enum": ["cyan", "magenta", "yellow", "black"] }
|
|
]
|
|
},
|
|
{
|
|
"name": "executeSQLAsync",
|
|
"async": true,
|
|
"parameters": [
|
|
{ "name": "databaseId", "$ref": "DatabaseId" },
|
|
{ "name": "query", "type": "string" }
|
|
],
|
|
"returns": [
|
|
{ "name": "columnNames", "type": "array", "items": { "type": "string" } },
|
|
{ "name": "notes", "type": "string" },
|
|
{ "name": "timestamp", "type": "number" },
|
|
{ "name": "values", "type": "object" },
|
|
{ "name": "payload", "type": "any" },
|
|
{ "name": "databaseId", "$ref": "DatabaseId" },
|
|
{ "name": "sqlError", "$ref": "Error" },
|
|
{ "name": "screenColor", "$ref": "PrimaryColors" },
|
|
{ "name": "alternateColors", "$ref": "ColorList" },
|
|
{ "name": "printColor", "type": "string", "enum": ["cyan", "magenta", "yellow", "black"] }
|
|
]
|
|
}
|
|
]
|
|
}
|