Skip to content

alexdaube/MQL

Repository files navigation

Multitel Query Language (MQL)

A user friendly language to query the database

Demo

Clone the repository and go to the root directory of the project.

Backend

Step 1: Make sure that java 8 is installed on the machine.

Step 2: Make sure that sqlite 3 is installed and running on the machine.

Step 3: Make sure that gradle build tool is installed and working in the command line.

Step 4: Build and run MQL server from the root of the project. Server is listening by default on port 4567.

  • Unix
    ./gradlew run
    
  • Windows
    gradlew run
    

Front-end

Step 1: Make sure that nodeJS is installed. I suggest using a node version manager.

Step 2: Install global dependencies. Execute these commands anywhere in the command line.

$ npm install -g webpack

Step 3: Install project dependencies. Go to the demo directory of the project and execute the instruction below from the command line. These dependencies can be found in package.json.

$ npm install

Step 4: Build and start the server from the command line in the demo directory. The server is running on port 8080 by default on your local machine.

$ npm start
Tests

Front-end Tests (From the demo directory)

$ npm test

Back-end Tests

  • Unix
    ./gradlew test
    
  • Windows
    gradlew test
    

Configurations (CMS)

Some gotchas using the cms

Operators and Junctions must have specific top level definitions. Synonyms, meanwhile, can be anything you want.

  • Operators: LESS, GREATER, BETWEEN, LIKE, NOT, OTHER
  • Junctions: OR, AND

All Tables, Attributes, and Foreign Keys top level definitions must be an exact match with the database talking to the MQL service.

Installation

Front-end

Step 1: Make sure that nodeJS is installed. I suggest using a node version manager.

Step 2: Install project dependencies. Go to the CMS client directory of the project and execute the instruction below from the command line. These dependencies can be found in package.json.

$ npm install

Step 3: Build and start the server from the command line in the CMS client directory. The server is running on port 8000 by default on your local machine.

$ npm start

Back-end

Step 1: Make sure that nodeJS is installed. I suggest using a node version manager.

Step 2: Make sure that mongoDB 3.4 is installed and running on the machine.

Step 3: Install global dependencies. Execute these commands anywhere in the command line.

$ npm install -g webpack

Step 4: Install project dependencies. Go to the CMS api directory of the project and execute the instruction below from the command line. These dependencies can be found in package.json.

$ npm install

Step 5: Build and start the server from the command line in the api directory. The server is running on port 3000 by default on your local machine.

$ npm start
Tests

From the CMS client directory

$ npm test

From the CMS api directory

$ npm test

Architecture

TODO

  • Implement internalization
  • Make user choose between json configurations(re-implementation) and cms configurations (user configuration)
  • Improve User experience of cms. As of now, it's too easy for user to make mistakes while defining the language
  • Revise cms backend architecture to make it more testable
  • Better abstraction for plugging data base with MQL (user configuration)

Contributors

  • Alexandre Désilets-Aubé
  • Nicolas Cotton
  • Xavier Kedzierski Elgstrand