-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add new db connection types, update docs for mod database args (WIP)
- Loading branch information
Showing
7 changed files
with
333 additions
and
276 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
--- | ||
title: duckdb | ||
sidebar_label: duckdb | ||
--- | ||
|
||
# duckdb | ||
|
||
The `duckdb` connection can be used to access a [DuckDB](https://duckdb.org/) database. | ||
|
||
```hcl | ||
connection "duckdb" "duckdb_connection" { | ||
connection_string = "duckdb://my_ducks.db" | ||
} | ||
``` | ||
|
||
## Arguments | ||
|
||
| Name | Type | Required?| Description | ||
|---------------------|---------|----------|------------------- | ||
| `connection_string` | String | Optional | DuckDB connection string | ||
|
||
|
||
|
||
### Connection String | ||
|
||
The DuckDB connection string is the path to a DuckDB database file: | ||
|
||
```bash | ||
duckdb:path/to/file | ||
``` | ||
|
||
The path is relative to the [mod location](/docs/run#mod-location), and `//` is optional after the scheme, thus the following are equivalent relative paths: | ||
|
||
```hcl | ||
duckdb:./my_ducks.db | ||
duckdb://./my_ducks.db | ||
duckdb://my_ducks.db | ||
``` | ||
|
||
and these are equivalent absolute paths: | ||
|
||
```hcl | ||
duckdb:/var/db/my_ducks.db | ||
duckdb:///var/db/my_ducks.db | ||
``` | ||
|
||
All arguments are optional, and a `duckdb` connection with no arguments will behave the same as the [default connection](#default-connection). | ||
|
||
<!-- | ||
## Attributes (Read-Only) | ||
| Attribute | Type | Description | ||
| --------------- | ------ |------------------------------------ | ||
| `???` | String | blah | ||
--> | ||
|
||
## Default Connection | ||
|
||
The `duckdb` connection type includes an implicit, default connection (`connection.duckdb.default`) that will be configured using the environment variables ??? | ||
```hcl | ||
connection "duckdb" "default" { | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
--- | ||
title: postgres | ||
sidebar_label: postgres | ||
--- | ||
|
||
# postgres | ||
|
||
The `postgres` connection can be used to access a PostgreSQL database. | ||
|
||
```hcl | ||
connection "postgres" "postgres_connection" { | ||
} | ||
``` | ||
|
||
## Arguments | ||
|
||
| Name | Type | Required?| Description | ||
|---------------------|---------|----------|------------------- | ||
| `connection_string` | String | Optional | SQL connection string | ||
|
||
All arguments are optional, and a `postgres` connection with no arguments will behave the same as the [default connection](#default-connection). | ||
|
||
connection_string | ||
username | ||
host | ||
port | ||
password | ||
ssl_mode | ||
|
||
|
||
|
||
## Attributes (Read-Only) | ||
|
||
| Attribute | Type | Description | ||
| --------------- | ------ |------------------------------------ | ||
| `???` | String | blah | ||
|
||
|
||
## Default Connection | ||
|
||
The `postgres` connection type includes an implicit, default connection (`connection.postgres.default`) that will be configured using the environment variables .... | ||
|
||
```hcl | ||
connection "postgres" "default" { | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
--- | ||
title: sqlite | ||
sidebar_label: sqlite | ||
--- | ||
|
||
|
||
# sqlite | ||
|
||
The `sqlite` connection can be used to access a [SQLite](https://www.sqlite.org/) database. | ||
|
||
```hcl | ||
connection "sqlite" "sqlite_connection" { | ||
connection_string = "sqlite://my_sqlite_db.db" | ||
} | ||
``` | ||
|
||
## Arguments | ||
|
||
| Name | Type | Required?| Description | ||
|---------------------|---------|----------|------------------- | ||
| `connection_string` | String | Optional | SQLite connection string | ||
|
||
|
||
|
||
### Connection String | ||
|
||
The SQLite connection string is the path to a SQLite database file: | ||
|
||
```bash | ||
sqlite:path/to/file | ||
``` | ||
|
||
The path is relative to the [mod location](/docs/run#mod-location), and `//` is optional after the scheme, thus the following are equivalent relative paths: | ||
|
||
```hcl | ||
sqlite:./my_sqlite_db.db | ||
sqlite://./my_sqlite_db.db | ||
sqlite://my_sqlite_db.db | ||
``` | ||
|
||
and these are equivalent absolute paths: | ||
|
||
```hcl | ||
sqlite:/var/db/my_sqlite_db.db | ||
sqlite:///var/db/my_sqlite_db.db | ||
``` | ||
|
||
All arguments are optional, and a `sqlite` connection with no arguments will behave the same as the [default connection](#default-connection). | ||
|
||
<!-- | ||
## Attributes (Read-Only) | ||
| Attribute | Type | Description | ||
| --------------- | ------ |------------------------------------ | ||
| `???` | String | blah | ||
--> | ||
|
||
## Default Connection | ||
|
||
The `sqlite` connection type includes an implicit, default connection (`connection.sqlite.default`) that will be configured using the environment variables... | ||
```hcl | ||
connection "sqlite" "default" { | ||
} | ||
``` |
Oops, something went wrong.