UNPKG

@nikitajs/db

Version:

Provides Nikita actions for various database operations. Currently supports PostgreSQL, MySQL and MariaDB.

87 lines (86 loc) 2.2 kB
{ "db": { "type": "object", "properties": { "admin_username": { "type": "string", "description": "The login of the database administrator. It should have the necessary\npermissions such as to create accounts when using the\n`nikita.db.user` action." }, "admin_password": { "type": "string", "description": "The password of the database administrator." }, "code": { "$ref": "module://@nikitajs/core/actions/execute#/definitions/config/properties/code", "description": "Expected code returned by the SQL execute command." }, "database": { "type": [ "null", "string" ], "description": "The default database name, provide the value `null` if you want to\nensore no default database is set." }, "engine": { "type": "string", "enum": [ "mariadb", "mysql", "postgresql" ], "description": "The engine type, can be MariaDB, MySQL or PostgreSQL. Values\nare converted to lower cases." }, "host": { "type": "string", "description": "The hostname of the database." }, "port": { "type": "integer", "description": "Port to the associated database." } }, "required": [ "admin_password", "engine", "host", "admin_username" ] }, "config": { "type": "object", "allOf": [ { "$ref": "module://@nikitajs/db/query#/definitions/db" } ], "properties": { "command": { "type": "string", "description": "SQL query to to execute." }, "grep": { "oneOf": [ { "type": "string" }, { "instanceof": "RegExp" } ], "description": "Ensure the query output match a string or a regular expression" }, "silent": { "type": "boolean", "default": true }, "trim": { "type": "boolean", "default": false, "description": "Trim the query result" } }, "required": [ "command" ] } }