{ "info": { "author": "Rupinder Singh", "author_email": "rupinder1133@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", "Programming Language :: Python :: 2", "Topic :: Software Development :: Build Tools" ], "description": "# ln2sqlmodule\n\nThis is an adoption of the awesome [ln2sql](https://github.com/FerreroJeremy/ln2sql) by [J\u00e9r\u00e9my Ferrero](https://github.com/FerreroJeremy) as a python module so that people can easily use it to create some awesome things !\n\nThings added in ln2sqlmodule :\n\n- API for getting WHERE queries with LIKE and '%'\n- INNER JOIN working correctly with FOREIGN KEY\n- PRIMARY KEY and FOREIGN KEY detection from ALTER STATEMENT\n- Value extraction from natural language\n\n# INSTALLATION\n\n```\npip install ln2sqlmodule\n```\n\n```\nimport ln2sqlmodule\n```\n\n# USAGE\n\n#### getSql(query, sqlDump[, outputFile])\n\n- **ln2sqlmodule.getSql(query, sqlDump[, outputFile])**\n\nreturns SQL query from natural language query\n\n[**outputFile Schema**](#outputfile-schema)\n\n\n\t Parameters :\n\t\t\tquery : query in natural language\n\t\t\tsqlDump : path to sql dump file \n\t\t\t[outputFile] : path to file to output SQL query in json \n\n\t\treturns : \n\t\t\tSQL query string\n\n\t\tExample:\n\t\t\tln2sqlmodule.getSql(\"get name of all emp\",\"./emp.sql\")\n\t\t\t-> SELECT name FROM emp\n\n### getSql_like(query, sqlDump[, outputFile])**\n\nreturns SQL query from natural language with **LIKE** with **%** in **WHERE** clause\n\n[**outputFile Schema**](#outputfile-schema)\n\n\t Parameters :\n\t\t\tquery : query in natural language\n\t\t\tsqlDump : path to sql dump file\n\t\t\t[outputFile] : path to file to output SQL query in json \n\n\t\treturns : \n\t\t\tSQL query string with LIKE\n\n\t\tExample:\n\t\t\tln2sqlmodule.getSql(\"all data for emp where name is rupinder\",\"./emp.sql\")\n\t\t\t-> SELECT * FROM emp WHERE name LIKE '%rupinder%'\n\n\t\t\tln2sqlmodule.getSql(\"all data for emp where name is 'abc xyz'\",\"./emp.sql\")\n\t\t\t-> SELECT * FROM emp WHERE name LIKE '%abc%xyz'\n\n\n\n### outputFile Schema\n\n\t{\n\t\t\"select\": {\n\t\t\t\"column\": \"\",\n\t\t\t\"type\": \"\"\n\t\t},\n\t\t\"from\": {\n\t\t\t\"table\": \"\"\n\t\t},\n\t\t\"join\": {\n\t\t},\n\t\t\"where\": {\n\t\t},\n\t\t\"group_by\": {\n\t\t},\n\t\t\"order_by\": {\n\t\t}\n\t}\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "https://github.com/rupinder1133/ln2sqlmodule/archive/v1.0.2.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/rupinder1133/ln2sqlmodule", "keywords": "ln2sql,NLP,SQL", "license": "gpl-3.0", "maintainer": "", "maintainer_email": "", "name": "ln2sqlmodule", "package_url": "https://pypi.org/project/ln2sqlmodule/", "platform": "", "project_url": "https://pypi.org/project/ln2sqlmodule/", "project_urls": { "Download": "https://github.com/rupinder1133/ln2sqlmodule/archive/v1.0.2.tar.gz", "Homepage": "https://github.com/rupinder1133/ln2sqlmodule" }, "release_url": "https://pypi.org/project/ln2sqlmodule/1.0.2/", "requires_dist": null, "requires_python": "", "summary": "This is a wrapper around ln2sql by Jeremy Ferrero for convenient use", "version": "1.0.2" }, "last_serial": 5704738, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "4e691464069df15a8c5c7186a2b10620", "sha256": "4c9d27118e74d49b377c865955d0f5b8915e36e0611c401d16a4e3d8350abe4b" }, "downloads": -1, "filename": "ln2sqlmodule-0.0.1.tar.gz", "has_sig": false, "md5_digest": "4e691464069df15a8c5c7186a2b10620", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13660, "upload_time": "2019-08-04T06:22:20", "url": "https://files.pythonhosted.org/packages/22/f6/717ffdaaf6abde963a00d22520b31f2e63012563256e06ef38e1354337a8/ln2sqlmodule-0.0.1.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "c8245dc53598aa084ea4d5736480eee0", "sha256": "e55f84c24753e62727a19f6db8cb8f83789004f61c488127aebe68a86d660893" }, "downloads": -1, "filename": "ln2sqlmodule-0.0.4-py2-none-any.whl", "has_sig": false, "md5_digest": "c8245dc53598aa084ea4d5736480eee0", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 30593, "upload_time": "2019-08-04T06:42:38", "url": "https://files.pythonhosted.org/packages/d0/94/b4e2a329ad4349720f3866c9a8fcb2311ebc0847e7b2fa1d8191f44bb02b/ln2sqlmodule-0.0.4-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "257abb973929a4104690d75d074048d6", "sha256": "e3c88d78e509d798cd426cc560d4601818b05b64d145123a4b19737571c09b36" }, "downloads": -1, "filename": "ln2sqlmodule-0.0.4.tar.gz", "has_sig": false, "md5_digest": "257abb973929a4104690d75d074048d6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15554, "upload_time": "2019-08-04T06:42:39", "url": "https://files.pythonhosted.org/packages/cf/de/36c6eb9059129afc0afc0c3bdea40dc9a34b8b24c0779bd53028f0303599/ln2sqlmodule-0.0.4.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "54da0ac2a7a0df1791c39f134fb2eea4", "sha256": "bedf76c418000beae162a70e32cf065ed84ccb52f939f723c4a70d8c8c155619" }, "downloads": -1, "filename": "ln2sqlmodule-1.0.0-py2-none-any.whl", "has_sig": false, "md5_digest": "54da0ac2a7a0df1791c39f134fb2eea4", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 30590, "upload_time": "2019-08-04T06:53:41", "url": "https://files.pythonhosted.org/packages/be/af/e1a2e06921667eccd2198b60020c307e32d6c231b61b150adf67de7a7583/ln2sqlmodule-1.0.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "224854f68d53c5a4a257caf12066f3e2", "sha256": "d8a46772de1e6b3f6515c73c287745c932e0a02cd8a07ea3d4fb9863f68eb12f" }, "downloads": -1, "filename": "ln2sqlmodule-1.0.0.tar.gz", "has_sig": false, "md5_digest": "224854f68d53c5a4a257caf12066f3e2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15542, "upload_time": "2019-08-04T06:53:43", "url": "https://files.pythonhosted.org/packages/cd/32/415f29f21c2ff465617ba43fdae55cc48a4fd5a820b36474496c2272a0cb/ln2sqlmodule-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "51f7714bd0aab66a2b05e1b26f016190", "sha256": "f5c79af581f76e09c1dcb48cacb6d762e55e6bdcee4a7ec0ea8badbc0f4cd468" }, "downloads": -1, "filename": "ln2sqlmodule-1.0.1-py2-none-any.whl", "has_sig": false, "md5_digest": "51f7714bd0aab66a2b05e1b26f016190", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 30595, "upload_time": "2019-08-04T07:03:15", "url": "https://files.pythonhosted.org/packages/3a/d7/9053f7ffb2baa3206442453ab8009a45ed6fe069466f3223531e3d210c73/ln2sqlmodule-1.0.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c6db4def02cfd8322a8245a43a98b536", "sha256": "188d016c6319be474fe27dc0c7f520713cdc8b5c4edade2bc8a6e9d3ca153db3" }, "downloads": -1, "filename": "ln2sqlmodule-1.0.1.tar.gz", "has_sig": false, "md5_digest": "c6db4def02cfd8322a8245a43a98b536", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15560, "upload_time": "2019-08-04T07:05:58", "url": "https://files.pythonhosted.org/packages/f5/6e/152b267c3f5a89dc9a38f7b28b45427239b04060dd170d37e58446b570e2/ln2sqlmodule-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "3768c1acfafd2771f44dd0868fbc13be", "sha256": "211b332a00812935057199299838ede6f99e9b7010107ad8e8ae4910bba77185" }, "downloads": -1, "filename": "ln2sqlmodule-1.0.2-py2-none-any.whl", "has_sig": false, "md5_digest": "3768c1acfafd2771f44dd0868fbc13be", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 10195848, "upload_time": "2019-08-20T17:49:52", "url": "https://files.pythonhosted.org/packages/f6/1d/7ff299efa8fd90f9deea58856eadbbc7ed58249b136f587f6d5fc1994461/ln2sqlmodule-1.0.2-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b09838fe074e440c870444566094b82a", "sha256": "2aa19d0d5ba112b6e6c31b33654817d5b7f38727ea856e0dea33d537801ff849" }, "downloads": -1, "filename": "ln2sqlmodule-1.0.2.tar.gz", "has_sig": false, "md5_digest": "b09838fe074e440c870444566094b82a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10149129, "upload_time": "2019-08-20T17:49:59", "url": "https://files.pythonhosted.org/packages/ea/49/3a8628ec82b57c97059cce91a1a9eafa5f2b5275bcecf217a13d6776e5bb/ln2sqlmodule-1.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3768c1acfafd2771f44dd0868fbc13be", "sha256": "211b332a00812935057199299838ede6f99e9b7010107ad8e8ae4910bba77185" }, "downloads": -1, "filename": "ln2sqlmodule-1.0.2-py2-none-any.whl", "has_sig": false, "md5_digest": "3768c1acfafd2771f44dd0868fbc13be", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 10195848, "upload_time": "2019-08-20T17:49:52", "url": "https://files.pythonhosted.org/packages/f6/1d/7ff299efa8fd90f9deea58856eadbbc7ed58249b136f587f6d5fc1994461/ln2sqlmodule-1.0.2-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b09838fe074e440c870444566094b82a", "sha256": "2aa19d0d5ba112b6e6c31b33654817d5b7f38727ea856e0dea33d537801ff849" }, "downloads": -1, "filename": "ln2sqlmodule-1.0.2.tar.gz", "has_sig": false, "md5_digest": "b09838fe074e440c870444566094b82a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10149129, "upload_time": "2019-08-20T17:49:59", "url": "https://files.pythonhosted.org/packages/ea/49/3a8628ec82b57c97059cce91a1a9eafa5f2b5275bcecf217a13d6776e5bb/ln2sqlmodule-1.0.2.tar.gz" } ] }