瀏覽代碼

HUE-9417. [docs] Introduce the Web components (sree)

sreenaths 5 年之前
父節點
當前提交
2155207715

+ 2 - 2
docs/docs-site/content/administrator/installation/dependencies/_index.md

@@ -19,7 +19,7 @@ export PYTHON_VER=python3.8
 
 ### Database
 
-Hue is being ran the most with [MySQL InnoDB, PostgreSQL or Oracle](https://www.cloudera.com/documentation/enterprise/latest/topics/hue_dbs_0.html)
+Hue is being ran the most with [MySQL InnoDB, PostgreSQL or Oracle](https://docs.cloudera.com/documentation/enterprise/latest/topics/hue_dbs_0.html)
 
 **Note**: MySQL module
 
@@ -195,7 +195,7 @@ There is more details on this [Apply Temporary Workaround for Oracle 12 Client](
 
 #### Mac
 
-* [Oracle Instant Client](http://www.oracle.com/technetwork/database/database-technologies/instant-client/downloads/index.html)
+* [Oracle Instant Client](https://www.oracle.com/database/technologies/instant-client/downloads.html)
 
 ### Java
 

+ 5 - 4
docs/docs-site/content/developer/_index.md

@@ -8,9 +8,10 @@ pre = "<b>3. </b>"
 
 Those are the main categories of development:
 
-* **Web application**: ramping-up with on the overall [Hue development](/developer/development) service
-* **SQL parsers**: update or reuse SQL [parsers](/developer/parsers/) or editor scratchpad
-* **Connector**: access your own data services or [data warehouses](/administrator/configuration/connectors/#databases)
-
+* **Web application**: Ramping-up with on the overall [Hue development](/developer/development) service
+* **[Connector](/developer/connectors)**: Access your own data services or [data warehouses](/administrator/configuration/connectors/#databases)
+* **[SQL parsers](/developer/parsers)**: Tokenize SQL queries, build autocompletes...
+* **[UI components](/developer/components)**: Reusable UI elements
+* **[GetHue](/developer/gethue)**: NPM package of reusable SQL parsers and UI components
 
 Also check on how to get started on [contribution ideas](https://github.com/cloudera/hue/blob/master/CONTRIBUTING.md).

+ 0 - 321
docs/docs-site/content/developer/api/_index.md

@@ -5,129 +5,6 @@ draft: false
 weight: 5
 ---
 
-Hue can easily be extended to natively support other databases or be enriched via other data catalogs. Some components of Hue like the SQL parsers or Editor Scratchpad can also be imported independently as dependencies into your own apps.
-
-
-## SQL Editor
-
-The [parsers](/developer/parsers/) are the flagship part of Hue and power extremely advanced autocompletes and other [SQL functionalities](/user/querying/#autocomplete). They are running on the client side and comes with just a few megabytes of JavaScript that are cached by the browser. This provides a very reactive experience to the end user and allows to import them as classic JavaScript modules for your own development needs.
-
-While the dynamic content like the list of tables, columns is obviously fetched via [remote endpoints](#sql-querying), all the SQL knowledge of the statements is available.
-
-See the currently shipped [SQL dialects](https://github.com/cloudera/hue/tree/master/desktop/core/src/desktop/js/parse/sql).
-
-### npm package
-
-What if I only want to use only the autocomplete as a JavaScript module in my own app?
-
-Importing the Parser can be simply done as a npm package. Here is an example on how to use the parser in a Node.js demo app. There are two ways to get the module:
-
-* npm registry
-
-    npm install gethue
-
-Will install the latest from https://www.npmjs.com/package/gethue. Then import the parser you need with something like below and run it on an SQL statement:
-
-    import sqlAutocompleteParser from 'gethue/parse/sql/hive/hiveAutocompleteParser';
-
-    const beforeCursor = 'SELECT col1, col2, tbl2.col3 FROM tbl; '; // Note extra space at end
-    const afterCursor = '';
-    const dialect = 'hive';
-    const debug = false;
-
-    console.log(
-      JSON.stringify(
-        sqlAutocompleteParser.parseSql(beforeCursor, afterCursor, dialect, debug),
-        null,
-        2
-      )
-    );
-
-Which then will output keywords suggestions and all the known locations:
-
-    { locations:
-      [ { type: 'statement', location: [Object] },
-        { type: 'statementType',
-          location: [Object],
-          identifier: 'SELECT' },
-        { type: 'selectList', missing: false, location: [Object] },
-        { type: 'column',
-          location: [Object],
-          identifierChain: [Array],
-          qualified: false,
-          tables: [Array] },
-        { type: 'column',
-          location: [Object],
-          identifierChain: [Array],
-          qualified: false,
-          tables: [Array] },
-        { type: 'column',
-          location: [Object],
-          identifierChain: [Array],
-          qualified: false,
-          tables: [Array] },
-        { type: 'table', location: [Object], identifierChain: [Array] },
-        { type: 'whereClause', missing: true, location: [Object] },
-        { type: 'limitClause', missing: true, location: [Object] } ],
-      lowerCase: false,
-      suggestKeywords:
-      [ { value: 'ABORT', weight: -1 },
-        { value: 'ALTER', weight: -1 },
-        { value: 'ANALYZE TABLE', weight: -1 },
-        { value: 'CREATE', weight: -1 },
-        { value: 'DELETE', weight: -1 },
-        { value: 'DESCRIBE', weight: -1 },
-        { value: 'DROP', weight: -1 },
-        { value: 'EXPLAIN', weight: -1 },
-        { value: 'EXPORT', weight: -1 },
-        { value: 'FROM', weight: -1 },
-        { value: 'GRANT', weight: -1 },
-        { value: 'IMPORT', weight: -1 },
-        { value: 'INSERT', weight: -1 },
-        { value: 'LOAD', weight: -1 },
-        { value: 'MERGE', weight: -1 },
-        { value: 'MSCK', weight: -1 },
-        { value: 'RELOAD FUNCTION', weight: -1 },
-        { value: 'RESET', weight: -1 },
-        { value: 'REVOKE', weight: -1 },
-        { value: 'SELECT', weight: -1 },
-        { value: 'SET', weight: -1 },
-        { value: 'SHOW', weight: -1 },
-        { value: 'TRUNCATE', weight: -1 },
-        { value: 'UPDATE', weight: -1 },
-        { value: 'USE', weight: -1 },
-        { value: 'WITH', weight: -1 } ],
-      definitions: [] }
-
-* Local dependency
-
-Checkout Hue and cd the [demo app](https://github.com/cloudera/hue/tree/master/tools/examples/api/hue_dep)
-
-    cd tools/examples/api/hue_dep
-
-    npm install
-    npm run webpack
-    npm run app
-
-In `package.json` there's a dependency on Hue:
-
-    "dependencies": {
-      "hue": "file:../../.."
-    },
-
-Now let's import the Hive parser:
-
-    import sqlAutocompleteParser from 'hue/desktop/core/src/desktop/js/parse/sql/hive/hiveAutocompleteParser';
-
-### Scratchpad
-
-The lightweight SQL Editor also called "Quick Query" comes as a [Web component](https://github.com/cloudera/hue/blob/master/desktop/core/src/desktop/js/ko/components/contextPopover/ko.quickQueryContext.js).
-
-!["Mini SQL Editor component"](https://cdn.gethue.com/uploads/2020/02/quick-query-component.jpg)
-
-
-## REST
-
 REST APIs are not all public yet but this is work in progress in [HUE-1450](https://issues.cloudera.org/browse/HUE-1450).
 
 Hue is Ajax based and has a REST API used by the browser to communicate (e.g. submit a query or workflow,
@@ -474,201 +351,3 @@ Then use the Python code to access a certain user information:
       u'desktop.DocumentPermission_groups': 0L,
       u'desktop.DocumentPermission_users': 0L,
       u'desktop.Document_tags': 18524L})
-
-
-### Creating an App
-
-Building a brand new application is more work but is ideal for creating a custom solution.
-
-**Note** It is now more recommended to integrate external services (e.g. integrate a new SQL Datatase with the Editor, add a new visualization...) to the core Hue APIs instead of building brand new application. This page gives good content in both cases. Feel free to contact the community for advice.
-
-#### Overview
-
-Hue leverages the browser to provide users with an environment for exploring
-and analyzing data.
-
-Build on top of the Hue SDK to enable your application to interact efficiently with
-Hadoop and the other Hue services.
-
-By building on top of Hue SDK, you get, out of the box:
-
-+ Configuration Management
-+ Hadoop interoperability
-+ Supervision of subprocesses
-+ A collaborative UI
-+ Basic user administration and authorization
-
-This document will orient you with the general structure of Hue
-and will walk you through adding a new application using the SDK.
-
-#### Creating the app
-
-Run "create_desktop_app" to Set up a New Source Tree
-
-    ./build/env/bin/hue create_desktop_app calculator
-    find calculator -type f
-    calculator/setup.py                                 # distutils setup file
-    calculator/src/calculator/__init__.py               # main src module
-    calculator/src/calculator/forms.py
-    calculator/src/calculator/models.py
-    calculator/src/calculator/settings.py               # app metadata setting
-    calculator/src/calculator/urls.py                   # url mapping
-    calculator/src/calculator/views.py                  # app business logic
-    calculator/src/calculator/templates/index.mako
-    calculator/src/calculator/templates/shared_components.mako
-
-    # Static resources
-    calculator/src/static/calculator/art/calculator.png # logo
-    calculator/src/static/calculator/css/calculator.css
-    calculator/src/static/calculator/js/calculator.js
-
-
-<div class="note">
-  Some apps are blacklisted on certain versions of CDH (such as the 'Spark' app) due to
-  certain incompatibilities, which prevent them loading from in Hue.
-  Check the hue.ini 'app_blacklist' parameter for details.
-</div>
-
-#### Install SDK Application
-
-As you'll discover if you look at calculator's <tt>setup.py</tt>,
-Hue uses a distutils <tt>entrypoint</tt> to
-register applications.  By installing the calculator
-package into Hue's python virtual environment,
-you'll install a new app.  The "app_reg.py" tool manages
-the applications that are installed. Note that in the following example, the value after the
-"--install" option is the path to the root directory of the application you want to install. In this
-example, it is a relative path to "/Users/philip/src/hue/calculator".
-
-        ./build/env/bin/python tools/app_reg/app_reg.py --install calculator --relative-paths
-        === Installing app at calculator
-        Updating registry with calculator (version 0.1)
-        --- Making egg-info for calculator
-
-
-<div class="note">
-  If you'd like to customize the build process, you can modify (or even complete
-  rewrite) your own `Makefile`, as long as it supports the set of required
-  targets. Please see `Makefile.sdk` for the required targets and their
-  semantics.
-</div>
-
-Congrats, you've added a new app!
-
-<div class="note">
-  What was that all about?
-  <a href="http://pypi.python.org/pypi/virtualenv">virtualenv</a>
-  is a way to isolate python environments in your system, and isolate
-  incompatible versions of dependencies.  Hue uses the system python, and
-  that's about all.  It installs its own versions of dependencies.
-
-  <a href="http://peak.telecommunity.com/DevCenter/PkgResources#entry-points">Entry Points</a>
-  are a way for packages to optionally hook up with other packages.
-</div>
-
-You can now browse the new application.
-
-    # If you haven't killed the old process, do so now.
-    build/env/bin/hue runserver
-
-And then visit <a href="http://localhost:8000">http://localhost:8000/</a> to check it out!
-You should see the app in the left menu.
-
-#### Customizing
-
-Now that your app has been installed, you'll want to customize it.
-As you may have guessed, we're going to build a small calculator
-application.  Edit `calculator/src/calculator/templates/index.mako`
-to include a simple form and a Knockout viewmodel:
-
-
-    <%!from desktop.views import commonheader, commonfooter %>
-    <%namespace name="shared" file="shared_components.mako" />
-
-    %if not is_embeddable:
-    ${commonheader("Calculator", "calculator", user, "100px") | n,unicode}
-    %endif
-
-    ## Main body
-    <div class="container-fluid calculator-components">
-      <div class="row">
-        <div class="span6 offset3 margin-top-30 text-center">
-          <form class="form-inline">
-            <input type="text" class="input-mini margin-right-10" placeholder="A" data-bind="value: a">
-            <!-- ko foreach: operations -->
-            <label class="radio margin-left-5">
-              <input type="radio" name="op" data-bind="checkedValue: $data, checked: $parent.chosenOperation" /><span data-bind="text: $data"></span>
-            </label>
-            <!-- /ko -->
-            <input type="text" class="input-mini margin-left-10" placeholder="B" data-bind="value: b">
-            <button class="btn" data-bind="click: calculate">Calculate</button>
-          </form>
-
-          <h2 data-bind="visible: result() !== null">The result is <strong data-bind="text: result"></strong></h2>
-        </div>
-      </div>
-    </div>
-
-    <script>
-      (function() {
-        var CalculatorViewModel = function () {
-          var self = this;
-
-          self.operations = ko.observableArray(['+', '-', '*', '/']);
-
-          self.a = ko.observable();
-          self.b = ko.observable();
-          self.chosenOperation = ko.observable('+');
-          self.result = ko.observable(null);
-
-          self.calculate = function () {
-            var a = parseFloat(self.a());
-            var b = parseFloat(self.b());
-            var result = null;
-            switch (self.chosenOperation()) {
-              case '+':
-                result = a + b;
-                break;
-              case '-':
-                result = a - b;
-                break;
-              case '*':
-                result = a * b;
-                break;
-              case '/':
-                result = a / b;
-            }
-            self.result(result);
-          }
-        };
-        $(document).ready(function () {
-          ko.applyBindings(new CalculatorViewModel(), $('.calculator-components')[0]);
-        });
-      })();
-    </script>
-
-    %if not is_embeddable:
-    ${commonfooter(messages) | n,unicode}
-    %endif
-
-The template language here is <a href="http://www.makotemplates.org/docs/">Mako</a>,
-which is flexible and powerful.  If you use the "`.html`" extension, Hue
-will render your page using
-<a href="https://docs.djangoproject.com/en/1.11/#the-template-layer">Django templates</a>
-instead.
-
-Note that we use Knockout.js to do the heavy lifting of this app.
-
-Let's edit `calculator/src/calculator/views.py` to simply render the page:
-
-    #!/usr/bin/env python
-
-    from desktop.lib.django_util import render
-
-    def index(request):
-      return render('index.mako', request, {
-        'is_embeddable': request.GET.get('is_embeddable', False),
-      })
-
-
-You can now go and try the calculator.

+ 46 - 0
docs/docs-site/content/developer/components/_index.md

@@ -0,0 +1,46 @@
+---
+title: "UI Components"
+draft: false
+weight: 4
+---
+
+Some of the UI elements in Hue are available as generic [Web Components](https://developer.mozilla.org/en-US/docs/Web/Web_Components). They are library/framework agnostic, and can be used in any web project irrespective of what its built upon - React, Angular, Ember or something else. They can be [imported](#using-hue-ui-components-in-your-project) as classic JavaScript modules for your own development needs.
+
+## Generic Components
+
+Following are the generic components in Hue. Doc for each component must give you a sound idea on the attributes/props that the components accept, and events they generate.
+
+* [er-diagram](/developer/components/er-diagram)
+* [Scratchpad](/developer/components/scratchpad)
+
+## Using UI components in your project
+
+All the Generic Hue components are published as [GetHue](/developer/gethue/) NPM package. Following will install the latest from https://www.npmjs.com/package/gethue.
+
+    npm install --save gethue
+
+Here is an example on how to use the er-diagram component once installed:
+
+### Import
+
+er-diagram can be imported into an html file using a simple script tag as follows.
+
+    <script type = "text/javascript" src="node_modules/gethue/web/er-diagram.js"></script>
+
+If you are using a bundler like webpack. They can be imported using a normal import statement.
+
+    import 'gethue/web/er-diagram';
+
+### Usage
+
+Once imported they can be used like a native HTML tag.
+
+    <er-diagram id="erd-id"/>
+
+Please refer these [demo apps](https://github.com/cloudera/hue/tree/master/tools/examples/components) for examples on how the components can be used. You must be able to directly pass attributes, and listen to custom and native events.
+
+### Use as Vue Components
+
+Internally these components are created using Vue.js & TypeScript. So you can even use them as plain Vue component, and take advantage of Vue features. Vue version of the components are under `gethue/components`.
+
+    import ERDiagram from 'gethue/components/er-diagram/index.vue';

+ 32 - 0
docs/docs-site/content/developer/components/er-diagram/_index.md

@@ -0,0 +1,32 @@
+---
+title: "er-diagram"
+draft: false
+---
+
+Hue ERD provides an illustration of various entities, and the relationship between them. Entity types supported by ERD currently are `Table` & `Literal`. We have a very generic architecture, and more types of entities can be supported in the future.
+
+Please refer [here](/developer/components/#using-ui-components-in-your-project) for importing the component in your own project. Also [er-diagram-demo](https://github.com/cloudera/hue/tree/master/tools/examples/components/er-diagram-demo) app have working examples.
+
+Once imported `er-diagram` can be used like a native HTML tag.
+
+    <er-diagram id="erd-element-id"/>
+
+### Attributes / Props
+
+- entities: Array &lt;[IEntity](https://github.com/cloudera/hue/blob/master/desktop/core/src/desktop/js/components/er-diagram/lib/interfaces.ts#L21)&gt; - An array of entity objects. Each entity will be a box in the UI.
+- relations: Array &lt;[IRelation](https://github.com/cloudera/hue/blob/master/desktop/core/src/desktop/js/components/er-diagram/lib/interfaces.ts#L26)&gt; - An array of relation objects. Each relation will connect two of the above entities.
+
+Please refer the [interfaces](https://github.com/cloudera/hue/blob/master/desktop/core/src/desktop/js/components/er-diagram/lib/interfaces.ts) for an idea on the structure of these objects.
+
+### Events
+
+- entity-clicked: Function([IEntity](https://github.com/cloudera/hue/blob/master/desktop/core/src/desktop/js/components/er-diagram/lib/interfaces.ts#L21)) - Will be triggered when an entity is clicked.
+
+## Resource Files
+
+- Hue
+  - **Web Component:** gethue/web/er-diagram.js
+  - **Vue Component:** gethue/components/er-diagram/index.vue
+- GetHue
+  - **Web Component:** desktop/core/src/desktop/js/components/er-diagram/webcomp.ts
+  - **Vue Component:** desktop/core/src/desktop/js/components/er-diagram/index.vue

+ 8 - 0
docs/docs-site/content/developer/components/scratchpad/_index.md

@@ -0,0 +1,8 @@
+---
+title: "Scratchpad"
+draft: false
+---
+
+The lightweight SQL Editor also called "Quick Query" comes as a [Web component](https://github.com/cloudera/hue/blob/master/desktop/core/src/desktop/js/ko/components/contextPopover/ko.quickQueryContext.js).
+
+!["Mini SQL Editor component"](https://cdn.gethue.com/uploads/2020/02/quick-query-component.jpg)

+ 43 - 0
docs/docs-site/content/developer/gethue/_index.md

@@ -0,0 +1,43 @@
+---
+title: "Hue in Your Project"
+date: 2019-03-13T18:28:09-07:00
+draft: false
+weight: 20
+---
+
+Some modules of Hue like the [SQL parsers](/developer/parsers/#using-hue-parsers-in-your-project) or [UI Components](/developer/components/#using-ui-components-in-your-project) can be imported independently as dependencies into your own apps. There are two ways to get them:
+
+- [npm registry](#npm-registry)
+- [Local dependency](#local-dependency)
+
+## npm registry
+
+    npm install gethue
+
+Will install the latest from https://www.npmjs.com/package/gethue. Then import the module you need with something like below:
+
+    import sqlAutocompleteParser from 'gethue/parse/sql/hive/hiveAutocompleteParser';
+
+UI components can be imported in a similar way.
+
+    import 'gethue/web/er-diagram';
+
+## Local dependency
+
+Checkout Hue and cd to the [demo app](https://github.com/cloudera/hue/tree/master/tools/examples/api/hue_dep). Steps are similar if you would like to use your own app instead of the demo app (hue_dep).
+
+    cd tools/examples/api/hue_dep
+
+    npm install
+    npm run webpack
+    npm run app
+
+In hue_dep `package.json` add a dependency on Hue:
+
+    "dependencies": {
+      "hue": "file:../../.."
+    },
+
+Now let's import the Hive parser:
+
+    import sqlAutocompleteParser from 'hue/desktop/core/src/desktop/js/parse/sql/hive/hiveAutocompleteParser';

+ 89 - 6
docs/docs-site/content/developer/parsers/_index.md

@@ -1,11 +1,17 @@
 ---
-title: "Autocompletes"
+title: "SQL Parsers"
 date: 2019-03-13T18:28:09-07:00
 draft: false
-weight: 2
+weight: 4
 ---
 
-This guide goes you through the steps necessary to create an autocompleter for any [SQL dialect](/administrator/configuration/connectors/#databases) in Hue. The major benefits are:
+The [parsers](/developer/parsers/) are the flagship part of Hue and power extremely advanced autocompletes and other [SQL functionalities](/user/querying/#autocomplete). They are running on the client side and comes with just a few megabytes of JavaScript that are cached by the browser. This provides a very reactive experience to the end user and allows to [import them](#using-hue-parsers-in-your-project) as classic JavaScript modules for your own development needs.
+
+While the dynamic content like the list of tables, columns is obviously fetched via [remote endpoints](#sql-querying), all the SQL knowledge of the statements is available.
+
+See the currently shipped [SQL dialects](https://github.com/cloudera/hue/tree/master/desktop/core/src/desktop/js/parse/sql).
+
+This guide takes you through the steps necessary to create an autocompleter for any [SQL dialect](/administrator/configuration/connectors/#databases) in Hue. The major benefits are:
 
 * Proposing only valid syntax in the autocomplete
 * Getting the list of tables, columns, UDFs... automatically
@@ -332,6 +338,83 @@ And cf. above [prerequisites](#prerequisites), any interpreter snippet with `ksq
 
 Note: after [HUE-8758](https://issues.cloudera.org/browse/HUE-8758) we will be able to have multiple interpreters on the same dialect (e.g. pointing to two different databases of the same type).
 
-## API: Exporting a parser
-
-Parsers generated by Hue are JavaScript modules. This makes it easy to import a parser into your own apps (e.g. Webapp, Node.Js...). How to do it is described in depth in the [API section](/developer/api/#sql-autocompletion).
+## Using parsers in your project
+
+Parsers generated by Hue are JavaScript modules. This makes it easy to import a parser into your own apps (e.g. Webapp, Node.Js...). Importing the Parser can be simply done as a npm package.
+
+Here is an example on how to use the Hive parser:
+
+    npm install --save gethue
+
+Will install the latest from https://www.npmjs.com/package/gethue. Then import the parser you need with something like below and run it on an SQL statement:
+
+    import sqlAutocompleteParser from 'gethue/parse/sql/hive/hiveAutocompleteParser';
+
+    const beforeCursor = 'SELECT col1, col2, tbl2.col3 FROM tbl; '; // Note extra space at end
+    const afterCursor = '';
+    const dialect = 'hive';
+    const debug = false;
+
+    console.log(
+      JSON.stringify(
+        sqlAutocompleteParser.parseSql(beforeCursor, afterCursor, dialect, debug),
+        null,
+        2
+      )
+    );
+
+Which then will output keywords suggestions and all the known locations:
+
+    { locations:
+      [ { type: 'statement', location: [Object] },
+        { type: 'statementType',
+          location: [Object],
+          identifier: 'SELECT' },
+        { type: 'selectList', missing: false, location: [Object] },
+        { type: 'column',
+          location: [Object],
+          identifierChain: [Array],
+          qualified: false,
+          tables: [Array] },
+        { type: 'column',
+          location: [Object],
+          identifierChain: [Array],
+          qualified: false,
+          tables: [Array] },
+        { type: 'column',
+          location: [Object],
+          identifierChain: [Array],
+          qualified: false,
+          tables: [Array] },
+        { type: 'table', location: [Object], identifierChain: [Array] },
+        { type: 'whereClause', missing: true, location: [Object] },
+        { type: 'limitClause', missing: true, location: [Object] } ],
+      lowerCase: false,
+      suggestKeywords:
+      [ { value: 'ABORT', weight: -1 },
+        { value: 'ALTER', weight: -1 },
+        { value: 'ANALYZE TABLE', weight: -1 },
+        { value: 'CREATE', weight: -1 },
+        { value: 'DELETE', weight: -1 },
+        { value: 'DESCRIBE', weight: -1 },
+        { value: 'DROP', weight: -1 },
+        { value: 'EXPLAIN', weight: -1 },
+        { value: 'EXPORT', weight: -1 },
+        { value: 'FROM', weight: -1 },
+        { value: 'GRANT', weight: -1 },
+        { value: 'IMPORT', weight: -1 },
+        { value: 'INSERT', weight: -1 },
+        { value: 'LOAD', weight: -1 },
+        { value: 'MERGE', weight: -1 },
+        { value: 'MSCK', weight: -1 },
+        { value: 'RELOAD FUNCTION', weight: -1 },
+        { value: 'RESET', weight: -1 },
+        { value: 'REVOKE', weight: -1 },
+        { value: 'SELECT', weight: -1 },
+        { value: 'SET', weight: -1 },
+        { value: 'SHOW', weight: -1 },
+        { value: 'TRUNCATE', weight: -1 },
+        { value: 'UPDATE', weight: -1 },
+        { value: 'USE', weight: -1 },
+        { value: 'WITH', weight: -1 } ],
+      definitions: [] }