1.2.6 • Published 6 years ago

@modus/gimbal-plugin-mysql v1.2.6

Weekly downloads
25
License
MIT
Repository
github
Last release
6 years ago

Gimbal mysql Plugin

npm (scoped) npm CircleCI PRs Welcome MIT Licensed Powered by Modus_Create

A Gimbal plugin to allow storage of data in MySQL.

Installation

First, you need to install the plugin to your project:

# with npm
npm install --save-dev @modus/gimbal-plugin-mysql

# or with yarn
yarn add --dev @modus/gimbal-plugin-mysql

Next, you need to add the plugin to your Gimbal configuration file:

YAML

plugins:
  - '@modus/gimbal-plugin-mysql'

JSON

{
  "plugins": ["@modus/gimbal-plugin-mysql"]
}

JavaScript

modules.exports = {
  plugins: ['@modus/gimbal-plugin-mysql'],
};

Configuration

In order to connect to a MySQL server, you must provide the host, password, and username via environment variables:

  • GIMBAL_MYSQL_HOST - Defaults to localhost, must be the host location of the server.
  • GIMBAL_MYSQL_USERNAME - Defaults to root, must be the username to connect to the server with.
  • GIMBAL_MYSQL_PASSWORD - Must be the password of the user in order to connect to the server.

@modus/gimbal-plugin-last-value

Allows for getting and saving last value reports. To enable this support, you need to set lastValue on the plugin config:

plugins:
  - plugin: '@modus/gimbal-plugin-mysql'
    lastValue: true

By default, this will use gimbal as the database and gimbal_archive table. To change these values, pass an object to the lastValue config:

plugins:
  - plugin: '@modus/gimbal-plugin-mysql'
    lastValue:
      database: my-database
      table: test_runs

The database must exist. If the table does not exist, the follow SQL will be executed:

CREATE TABLE IF NOT EXISTS <table_name> (command VARCHAR(255) NOT NULL, date DATETIME NOT NULL, report LONGTEXT NOT NULL) ENGINE=INNODB;
1.2.6

6 years ago

1.2.5

6 years ago

1.2.4

6 years ago

1.2.3

6 years ago

1.2.2

6 years ago

1.2.1

6 years ago

1.2.0

6 years ago

1.1.14

6 years ago

1.1.13

6 years ago

1.1.12

6 years ago

1.1.11

6 years ago

1.1.10

6 years ago

1.1.9

6 years ago

1.1.8

6 years ago

1.1.7

6 years ago

1.1.6

6 years ago

1.1.5

6 years ago

1.1.4

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.13

6 years ago

1.0.12

6 years ago

1.0.11

6 years ago