{"id":19339584,"url":"https://github.com/dsferruzza/simplesqlparser","last_synced_at":"2025-04-23T02:30:51.954Z","repository":{"id":8175204,"uuid":"9598884","full_name":"dsferruzza/simpleSqlParser","owner":"dsferruzza","description":"Javascript library to parse CRUD (Create Retrieve Update Delete) SQL queries.","archived":false,"fork":false,"pushed_at":"2017-01-17T17:53:32.000Z","size":258,"stargazers_count":99,"open_issues_count":8,"forks_count":29,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-11T05:07:09.322Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dsferruzza.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-04-22T12:53:57.000Z","updated_at":"2025-02-07T18:13:56.000Z","dependencies_parsed_at":"2022-08-06T20:15:42.289Z","dependency_job_id":null,"html_url":"https://github.com/dsferruzza/simpleSqlParser","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsferruzza%2FsimpleSqlParser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsferruzza%2FsimpleSqlParser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsferruzza%2FsimpleSqlParser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsferruzza%2FsimpleSqlParser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dsferruzza","download_url":"https://codeload.github.com/dsferruzza/simpleSqlParser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250357564,"owners_count":21417306,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T03:23:02.826Z","updated_at":"2025-04-23T02:30:51.679Z","avatar_url":"https://github.com/dsferruzza.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"simpleSqlParser\n===============\n\nJavascript library to parse CRUD (Create Retrieve Update Delete) SQL queries.\n\n**v1 will be deprecated as soon as v2 is complete! Try v2: https://github.com/dsferruzza/simpleSqlParser/tree/v2**\n\n## How to use\n\n### From browser\n\nImport the JS file in your page:\n\n```html\n\u003cscript src=\"simpleSqlParser.js\"\u003e\u003c/script\u003e\n```\n\n### From Node.js\n\nInstall the module from [npm](https://npmjs.org/package/simple-sql-parser) using `npm i simple-sql-parser --save`.\n\nImport the JS module in your app:\n\n```js\nvar simpleSqlParser = require('simple-sql-parser');\n```\n\n### Parse a query:\n\n```js\nvar ast = simpleSqlParser.sql2ast('your SQL query');\nconsole.log(ast);\n```\n\n### Create a query from AST:\n\n```js\nvar query = simpleSqlParser.ast2sql(ast);\nconsole.log(query);\n```\n\n*AST means Abstract Syntax Tree.*\n\n## Examples\n\n* See `example.html` (open brower's console)\n* Have a look to the unit tests `tests/tests.js` to see what's possible\n\n## Notes\n\nsimpleSqlParser only supports these queries:\n\n* SELECT\n* INSERT\n* UPDATE\n* DELETE\n\nsimpleSqlParser **is not a full SQL parser!**\nIt only support few SQL mechanisms and keywords.\nFeel free to make a pull request/issue.\n\n## How to install dev tools\n\nIf you want to contribute, please write tests and respect the coding style.\n\nTo install dev tools:\n\n- install Node.js (http://nodejs.org/)\n- install **grunt-cli** globally: `npm i -g grunt-cli`\n- install dev dependencies: `npm i`\n- use `grunt` to check your code!\n\n## License\n\nThe MIT License (MIT)\nCopyright (c) 2013-2014 David Sferruzza\n \nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n \nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n \nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdsferruzza%2Fsimplesqlparser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdsferruzza%2Fsimplesqlparser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdsferruzza%2Fsimplesqlparser/lists"}