Skip to content

Latest commit

 

History

History
54 lines (40 loc) · 1.85 KB

README.md

File metadata and controls

54 lines (40 loc) · 1.85 KB

sql2mongo

Execute SQL queries [SELECT] on MongoDB

Code status

Build Status Scrutinizer Code Quality

Requirements

  • PHP 5.6
  • MongoDB 3+
  • Unix OS

Installation

$ pecl install mongodb
$ echo "extension=mongodb.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`
$ composer self-update
$ composer install

For import test collections to Mongodb you can go to the root project folder and run following command

$ mongoimport --db test --collection restaurants --drop --file dump/dataset.json

Using

You can run app by following steps:

  • Go to project root folder
  • Run php script php src/sql2mongo.php
  • Enter command help
  • You will see list of available commands sql2mongo user interface
  • How you can use these commands you can see on the screenshots sql2mongo executing commands
  • How execute SQL query you can see on the screenshots sql2mongo executing SQL query sql2mongo executing SQL query

Dependencies

PS. Sorry for my English