{ "info": { "author": "Sean Harrison", "author_email": "sah@bookgenesis.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)", "Programming Language :: Python :: 3" ], "description": "# SQL-query\n\nSQL is a fantastic language \u2014 one of the most successful programming languages in the world. We should use it, not try to replace it with a bespoke DSL. \n\nYet there are a couple of things that are nice to have help with in constructing SQL queries:\n\n* **dialect-aware safe value substitution**: Every database interface has its own syntax for substituting values safely (not to allow SQL injection) \u2014 for example, `$1` or `?` or `:varname`. They also have different requirements for the format of the sql + values argument lists. I want to able to write my queries with the same value substituion syntax, regardless of which database interface I am using, and know that the SQL will be output correctly for my interface, and that the values will be passed to the database engine safely. \n* **dynamic attributes**: In many applications, I don't know in advance which attributes I am going to select, insert, update, or filter by. I want to SELECT a given list of attributes, or filter WHERE a given key/value mapping, or UPDATE or INSERT particular attributes, without having to rewrite the SQL query.\n* **block composition**: Some SQL queries are very complex. I want to able to compose blocks of SQL into larger queries, so that I can manage this complexity effectively. (Most database query DSLs are unable to deal with complex queries, or they invent a hard-to-learn language for writing those queries. Learning SQL is a better use of our time, but having some assistance managing/manipulating the different blocks in a query would be very helpful.)\n\nBehold SQL-query: [**OUTDATED**]\n\n* One class, `SQL`, with one field, `query`, and one method, `.render`, which takes one optional argument, `dialect`. \n* Dynamic value replacement, rendered in one of the supported dialects: postgresql (`$1`), sqlalchemy (`:varname`), embedded (`:varname`), mysql (`%(varname)s`), sqlite (`?`). Default style is `:varname`.\n* Dynamic attribute/value lists in `SELECT`, `WHERE`, `INSERT`, and `UPDATE` syntax via **???** [*TBD*]\n* Block composition via **???** [*TBD*]\n\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/blackearth/sql-query", "keywords": "", "license": "MPL 2.0", "maintainer": "", "maintainer_email": "", "name": "sql-query", "package_url": "https://pypi.org/project/sql-query/", "platform": "", "project_url": "https://pypi.org/project/sql-query/", "project_urls": { "Homepage": "https://github.com/blackearth/sql-query" }, "release_url": "https://pypi.org/project/sql-query/0.4.1/", "requires_dist": null, "requires_python": "", "summary": "Write queries in SQL.", "version": "0.4.1" }, "last_serial": 5310558, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "9e0df30761c5eefdf8a4bbd46f7606bc", "sha256": "5a15530aacc3f37bed85794ee45c2e27e5c6920282fc08ef1f84a16f190549c2" }, "downloads": -1, "filename": "sql_query-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "9e0df30761c5eefdf8a4bbd46f7606bc", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7912, "upload_time": "2019-05-18T16:28:27", "url": "https://files.pythonhosted.org/packages/3f/b7/2ec537f63328f6d906ca70d8509bf5ccfb7666e113a9eeb3aa9bcefe9548/sql_query-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "bd57c20a6a4c4d2bd3cbc52c41157774", "sha256": "5986bb98515df2ae49f8f6f76c4e975dd7993aa9f96f0598bca8518d8072a8e3" }, "downloads": -1, "filename": "sql-query-0.1.0.tar.gz", "has_sig": false, "md5_digest": "bd57c20a6a4c4d2bd3cbc52c41157774", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2296, "upload_time": "2019-05-18T16:28:29", "url": "https://files.pythonhosted.org/packages/d6/b2/0991f8c9c9edfc0c4b387636aa626f8323a66b1f30914e8c6f32eb76458d/sql-query-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "5b78440869982179430bae24e480fb45", "sha256": "58bfda58dd7013686913b89461bf7e06ba6525c63eb427f5a5d9e9a8416184e8" }, "downloads": -1, "filename": "sql_query-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "5b78440869982179430bae24e480fb45", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9736, "upload_time": "2019-05-18T19:19:32", "url": "https://files.pythonhosted.org/packages/7c/49/cfc8aa7da1bd447cddceed5104897653ffe94b92fbeaf3d4b15c5c69ae2c/sql_query-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f56630de6343fe64d00781121d70c000", "sha256": "f52f281042fdc37f70a13167e9a710e5ba7994ae4f2186692738cc9a975b0c1c" }, "downloads": -1, "filename": "sql-query-0.2.0.tar.gz", "has_sig": false, "md5_digest": "f56630de6343fe64d00781121d70c000", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3328, "upload_time": "2019-05-18T19:19:34", "url": "https://files.pythonhosted.org/packages/7d/34/e9f0058a8b07908a2e147cf046d0356170f2a2a636e70523f8bae57832fd/sql-query-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "f77af328b73931bc06211ef6dfc5e620", "sha256": "b786ef2c73c2ae2d06efbe1fa2107506e29f954bff19c0c0c32588faaf692ab1" }, "downloads": -1, "filename": "sql_query-0.2.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "f77af328b73931bc06211ef6dfc5e620", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9734, "upload_time": "2019-05-18T19:21:05", "url": "https://files.pythonhosted.org/packages/d4/98/dfb3a148465859a00814b9bdd2df5218903f2f4540c4d74d37d2f3027eae/sql_query-0.2.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "99a3ef6ebc370df13fea7f80408a2369", "sha256": "390c4f093d23814279e2f69bfb3b0067fee78e47f9821a3de057404fa084802e" }, "downloads": -1, "filename": "sql-query-0.2.1.tar.gz", "has_sig": false, "md5_digest": "99a3ef6ebc370df13fea7f80408a2369", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3328, "upload_time": "2019-05-18T19:21:06", "url": "https://files.pythonhosted.org/packages/4b/09/32ce8e7020a0bf3e8d69293bf290a74f28abd7c9da3dd4c4d1a304de5ecd/sql-query-0.2.1.tar.gz" } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "4ef7a2236d1edbebe4348a8535317ae1", "sha256": "22c87c30f11aa6be982a13f53770603bf4f6d1c776dd99de8e11cca0a3a93b9b" }, "downloads": -1, "filename": "sql_query-0.4.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "4ef7a2236d1edbebe4348a8535317ae1", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9571, "upload_time": "2019-05-24T04:12:05", "url": "https://files.pythonhosted.org/packages/73/78/689470fb5f9ea86d634bf9b8715396cfaa2e292ca2d7a2c216050d907452/sql_query-0.4.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f16fd1e950a8789cf3e59379b8664eae", "sha256": "93dbf4f1856c4a5b5b2eb9ebaf9c1b3d4fbb5f762bede503c42e8f3198e856e4" }, "downloads": -1, "filename": "sql-query-0.4.1.tar.gz", "has_sig": false, "md5_digest": "f16fd1e950a8789cf3e59379b8664eae", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3430, "upload_time": "2019-05-24T04:12:07", "url": "https://files.pythonhosted.org/packages/55/a0/5a95349bb1708a21a33b37f453be828f8166a2ea87f42ad3d1b6d0826567/sql-query-0.4.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4ef7a2236d1edbebe4348a8535317ae1", "sha256": "22c87c30f11aa6be982a13f53770603bf4f6d1c776dd99de8e11cca0a3a93b9b" }, "downloads": -1, "filename": "sql_query-0.4.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "4ef7a2236d1edbebe4348a8535317ae1", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9571, "upload_time": "2019-05-24T04:12:05", "url": "https://files.pythonhosted.org/packages/73/78/689470fb5f9ea86d634bf9b8715396cfaa2e292ca2d7a2c216050d907452/sql_query-0.4.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f16fd1e950a8789cf3e59379b8664eae", "sha256": "93dbf4f1856c4a5b5b2eb9ebaf9c1b3d4fbb5f762bede503c42e8f3198e856e4" }, "downloads": -1, "filename": "sql-query-0.4.1.tar.gz", "has_sig": false, "md5_digest": "f16fd1e950a8789cf3e59379b8664eae", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3430, "upload_time": "2019-05-24T04:12:07", "url": "https://files.pythonhosted.org/packages/55/a0/5a95349bb1708a21a33b37f453be828f8166a2ea87f42ad3d1b6d0826567/sql-query-0.4.1.tar.gz" } ] }