{"id":19683889,"url":"https://github.com/prisma/connection-string","last_synced_at":"2025-09-14T19:43:19.856Z","repository":{"id":44609388,"uuid":"294364473","full_name":"prisma/connection-string","owner":"prisma","description":"connection-string + @pimeys/connection-string","archived":false,"fork":false,"pushed_at":"2023-03-31T15:10:55.000Z","size":57,"stargazers_count":12,"open_issues_count":2,"forks_count":3,"subscribers_count":24,"default_branch":"main","last_synced_at":"2025-04-20T11:00:01.008Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/prisma.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE-APACHE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-10T09:29:34.000Z","updated_at":"2024-01-03T10:03:13.000Z","dependencies_parsed_at":"2024-11-11T18:16:04.587Z","dependency_job_id":"1f45f9bf-4eef-4502-beb9-a9b32387d261","html_url":"https://github.com/prisma/connection-string","commit_stats":{"total_commits":57,"total_committers":9,"mean_commits":6.333333333333333,"dds":"0.45614035087719296","last_synced_commit":"4b3e35144fcb7e1e14a6932390018d0a6e843cb4"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prisma%2Fconnection-string","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prisma%2Fconnection-string/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prisma%2Fconnection-string/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prisma%2Fconnection-string/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prisma","download_url":"https://codeload.github.com/prisma/connection-string/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251444526,"owners_count":21590510,"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-11T18:15:59.573Z","updated_at":"2025-04-29T05:31:32.231Z","avatar_url":"https://github.com/prisma.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003econnection-string\u003c/h1\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003cstrong\u003e\n    ADO.net and JDBC connection string parsing in Rust and JavaScript\n  \u003c/strong\u003e\n\u003c/div\u003e\n\n\u003cbr /\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003c!-- Crates version --\u003e\n  \u003ca href=\"https://crates.io/crates/connection-string\"\u003e\n    \u003cimg src=\"https://img.shields.io/crates/v/connection-string.svg?style=flat-square\"\n    alt=\"Crates.io version\" /\u003e\n  \u003c/a\u003e\n  \u003c!-- Downloads --\u003e\n  \u003ca href=\"https://crates.io/crates/connection-string\"\u003e\n    \u003cimg src=\"https://img.shields.io/crates/d/connection-string.svg?style=flat-square\"\n      alt=\"Download\" /\u003e\n  \u003c/a\u003e\n  \u003c!-- docs.rs docs --\u003e\n  \u003ca href=\"https://docs.rs/connection-string\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/docs-latest-blue.svg?style=flat-square\"\n      alt=\"docs.rs docs\" /\u003e\n  \u003c/a\u003e\n  \u003c!-- npmjs.com version --\u003e\n  \u003ca href=\"https://badge.fury.io/js/@pimeys%2Fconnection-string\"\u003e\n    \u003cimg src=\"https://badge.fury.io/js/@pimeys%2Fconnection-string.svg\"\n      alt=\"npm version\" height=\"18\"\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ch3\u003e\n    \u003ca href=\"https://docs.rs/connection-string\"\u003e\n      API Docs\n    \u003c/a\u003e\n    \u003cspan\u003e | \u003c/span\u003e\n    \u003ca href=\"https://github.com/prisma/connection-string/releases\"\u003e\n      Releases\n    \u003c/a\u003e\n    \u003cspan\u003e | \u003c/span\u003e\n    \u003ca href=\"https://github.com/prisma/connection-string/blob/main.github/CONTRIBUTING.md\"\u003e\n      Contributing\n    \u003c/a\u003e\n  \u003c/h3\u003e\n\u003c/div\u003e\n\n## Installation for Rust\n```sh\n$ cargo add connection-string\n```\n\n## Usage for JavaScript\nThe crate is available in npm as `@pimeys/connection-string`. Usage patters try\nto follow the Rust version as close as possible. Please see the [Rust\ndocs](https://docs.rs/connection-string) for more information.\n\nJDBC:\n\n``` javascript\nconst j = new JdbcString(\"jdbc:sqlserver://localhost\\\\INSTANCE:1433;database=master;user=SA;password={my_password;123}\");\n\nconsole.log(j.server_name()); // \"localhost\"\nconsole.log(j.port()); // 1433\nconsole.log(j.instance_name()); // \"INSTANCE\"\nconsole.log(j.get(\"database\")); // \"master\"\nconsole.log(j.get(\"password\")); // \"my_password;123\" (see escaping)\nconsole.log(j.keys()); // [\"database\", \"user\", \"password\"]\nconsole.log(j.set(\"password\", \"a;;new;;password\")); // \"my_password;123\" (returns the old value, if available)\n\n// \"jdbc:sqlserver://localhost\\INSTANCE:1433;user=SA;database=master;password=a{;;}new{;;}password\"\nconsole.log(j.to_string())\n```\n\nADO.net:\n\n``` javascript\nconst a = new AdoNetString(\"server=tcp:localhost,1433;user=SA;password=a{;;}new{;;}password\");\n\nconsole.log(a.get(\"password\")); // a;;new;;password\nconsole.log(a.set(\"user\", \"john\")); // \"SA\" (returns the old value, if available)\n\n// \"server=tcp:localhost,1433;user=john;password=a{;;}new{;;}password\"\nconsole.log(j.to_string())\n```\n\n## Safety\nThis crate uses ``#![deny(unsafe_code)]`` to ensure everything is implemented in\n100% Safe Rust.\n\n## Contributing\nWant to join us? Check out our [\"Contributing\" guide][contributing] and take a\nlook at some of these issues:\n\n- [Issues labeled \"good first issue\"][good-first-issue]\n- [Issues labeled \"help wanted\"][help-wanted]\n\n[contributing]: https://github.com/prisma/connection-string/blob/master.github/CONTRIBUTING.md\n[good-first-issue]: https://github.com/prisma/connection-string/labels/good%20first%20issue\n[help-wanted]: https://github.com/prisma/connection-string/labels/help%20wanted\n\n## Building\n\nThe build procedure and dependencies are defined in the provided\n[flake.nix](flake.nix) file. Please install the unstable Nix with flakes support\n([Linux](https://nixos.wiki/wiki/Nix_Installation_Guide), [macOS](https://gist.github.com/sagittaros/32dc6ffcbc423dc0fed7eef24698d5ca)).\n\nThe WASM module can be built with:\n\n```bash\nnix build\n```\n\nThis creates a link `result` to the current directory, containing a NodeJS\npackage with the Rust code compiled as WASM bytecode.\n\n## Testing\n\nRun the tests with the nix subcommand:\n\n```bash\nnix run .#test\n```\n\n## Publishing\n\nThe `updatePackageVersion` command changes the package version to the Rust `Cargo.toml` and\nJavaScript `package.json` at the same time:\n\n```bash\nnix run .#updatePackageVersion 0.1.14\n```\n\nDon't forget to add the tag before publishing the library:\n\n```bash\ngit tag v0.1.14\n```\n\nThe publishing can be done separately or together with the `publish` command:\n\n```bash\nnix run .#publishRust\nnix run .#publishJavascript\n```\n\nor\n\n```bash\nnix run .#publish\n```\n\nPlease be sure you have the corresponding publishing rights in crates and npmjs.\n\n## License\n\n\u003csup\u003e\nLicensed under either of \u003ca href=\"LICENSE-APACHE\"\u003eApache License, Version\n2.0\u003c/a\u003e or \u003ca href=\"LICENSE-MIT\"\u003eMIT license\u003c/a\u003e at your option.\n\u003c/sup\u003e\n\n\u003cbr/\u003e\n\n\u003csub\u003e\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in this crate by you, as defined in the Apache-2.0 license, shall\nbe dual licensed as above, without any additional terms or conditions.\n\u003c/sub\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprisma%2Fconnection-string","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprisma%2Fconnection-string","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprisma%2Fconnection-string/lists"}