Installation for Rust
Usage for JavaScript
The crate is available in npm as @pimeys/connection-string
. Usage patters try
to follow the Rust version as close as possible. Please see the Rust
docs for more information.
JDBC:
const j = ;
console.log; // "localhost"
console.log; // 1433
console.log; // "INSTANCE"
console.log; // "master"
console.log; // "my_password;123" (see escaping)
console.log; // "my_password;123" (returns the old value, if available)
// "jdbc:sqlserver://localhost\INSTANCE:1433;user=SA;database=master;password=a{;;}new{;;}password"
console.log
ADO.net:
const a = ;
console.log; // a;;new;;password
console.log; // "SA" (returns the old value, if available)
// "server=tcp:localhost,1433;user=john;password=a{;;}new{;;}password"
console.log
Safety
This crate uses #![deny(unsafe_code)]
to ensure everything is implemented in
100% Safe Rust.
Contributing
Want to join us? Check out our "Contributing" guide and take a look at some of these issues: