> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinetica.com/llms.txt
> Use this file to discover all available pages before exploring further.

# build_connection_url

> build_connection_url — Kinetica Rust API

[gpudb\_api](https://docs.kinetica.com/content/api/rust/index.md)::<wbr />[sqlx\_support](https://docs.kinetica.com/content/api/rust/sqlx_support/index.md)
[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/sqlx_support.rs#L610-L618)&#x20;

<pre>`pub fn build_connection_url(    host: &str,    port: u16,    username: &str,    password: &str,    database: &str,) -> String`</pre>

Create a connection URL from components.

## Example

```rust theme={null}
use gpudb_api::sqlx_support::build_connection_url;

let url = build_connection_url("localhost", 5432, "admin", "password", "postgres");
assert_eq!(url, "postgres://admin:password@localhost:5432/postgres");
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.