{"id":17347209,"url":"https://github.com/hex2f/node-sql-rs","last_synced_at":"2025-10-07T13:58:57.294Z","repository":{"id":151862342,"uuid":"624954894","full_name":"hex2f/node-sql-rs","owner":"hex2f","description":"A Neon based brige for the Rust sqlparser-rs","archived":false,"fork":false,"pushed_at":"2023-04-07T19:12:02.000Z","size":5,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-15T06:59:50.276Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/hex2f.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-07T17:20:41.000Z","updated_at":"2023-06-05T18:45:57.000Z","dependencies_parsed_at":"2023-05-09T11:01:40.273Z","dependency_job_id":null,"html_url":"https://github.com/hex2f/node-sql-rs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hex2f/node-sql-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hex2f%2Fnode-sql-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hex2f%2Fnode-sql-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hex2f%2Fnode-sql-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hex2f%2Fnode-sql-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hex2f","download_url":"https://codeload.github.com/hex2f/node-sql-rs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hex2f%2Fnode-sql-rs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278786671,"owners_count":26045588,"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","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-10-15T16:47:57.282Z","updated_at":"2025-10-07T13:58:57.259Z","avatar_url":"https://github.com/hex2f.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sql-rs\n\n**sql-rs:** A Neon based brige for the Rust sqlparser-rs\n\n## Installing sql-rs\n\nInstalling sql-rs requires a [supported version of Node and Rust](https://github.com/neon-bindings/neon#platform-support).\n\nYou can install the project with npm.\n\n```sh\n$ npm install sql-rs\n```\n\nThis fully installs the project, including installing any dependencies and running the build.\n\n## Using sql-rs\n\nCurrently you need to manually parse the JSON returned by the `parse_sql_to_json_string` function. This is because there's currently no easy way to convert all of the Rust `sqlparser::ast` structs to JavaScript objects.\n\n```js\nconst { parse_sql_to_json_string } = require('sql-rs')\nconst sql = \"SELECT id, name FROM users WHERE age \u003e 25\"\nconst ast = JSON.parse(parse_sql_to_json_string(sql))\n```\n\n## Available Scripts\n\nIn the project directory, you can run:\n\n### `npm install`\n\nInstalls the project, including running `npm run build`.\n\n### `npm build`\n\nBuilds the Node addon (`index.node`) from source.\n\nAdditional [`cargo build`](https://doc.rust-lang.org/cargo/commands/cargo-build.html) arguments may be passed to `npm build` and `npm build-*` commands. For example, to enable a [cargo feature](https://doc.rust-lang.org/cargo/reference/features.html):\n\n```\nnpm run build -- --feature=beetle\n```\n\n#### `npm build-debug`\n\nAlias for `npm build`.\n\n#### `npm build-release`\n\nSame as [`npm build`](#npm-build) but, builds the module with the [`release`](https://doc.rust-lang.org/cargo/reference/profiles.html#release) profile. Release builds will compile slower, but run faster.\n\n### `npm test`\n\nRuns the unit tests by calling `cargo test`. You can learn more about [adding tests to your Rust code](https://doc.rust-lang.org/book/ch11-01-writing-tests.html) from the [Rust book](https://doc.rust-lang.org/book/).\n\n## Project Layout\n\nThe directory structure of this project is:\n\n```\nsql-rs/\n├── Cargo.toml\n├── README.md\n├── index.node\n├── package.json\n├── src/\n|   └── lib.rs\n└── target/\n```\n\n### Cargo.toml\n\nThe Cargo [manifest file](https://doc.rust-lang.org/cargo/reference/manifest.html), which informs the `cargo` command.\n\n### index.node\n\nThe Node addon—i.e., a binary Node module—generated by building the project. This is the main module for this package, as dictated by the `\"main\"` key in `package.json`.\n\nUnder the hood, a [Node addon](https://nodejs.org/api/addons.html) is a [dynamically-linked shared object](https://en.wikipedia.org/wiki/Library_(computing)#Shared_libraries). The `\"build\"` script produces this file by copying it from within the `target/` directory, which is where the Rust build produces the shared object.\n\n### src/\n\nThe directory tree containing the Rust source code for the project.\n\n### src/lib.rs\n\nThe Rust library's main module.\n\n### target/\n\nBinary artifacts generated by the Rust build.\n\n## Learn More\n\nTo learn more about Neon, see the [Neon documentation](https://neon-bindings.com).\n\nTo learn more about Rust, see the [Rust documentation](https://www.rust-lang.org).\n\nTo learn more about Node, see the [Node documentation](https://nodejs.org).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhex2f%2Fnode-sql-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhex2f%2Fnode-sql-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhex2f%2Fnode-sql-rs/lists"}