Skip to content

Commit

Permalink
docs: update schema docs to include ODBC destinations
Browse files Browse the repository at this point in the history
  • Loading branch information
vigimite committed Jul 28, 2024
1 parent b119dab commit 0dc1798
Show file tree
Hide file tree
Showing 3 changed files with 98 additions and 1 deletion.
2 changes: 1 addition & 1 deletion aqueducts/schema_gen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ build = "build.rs"
publish = false

[build-dependencies]
aqueducts = { workspace = true, features = ["schema_gen"] }
aqueducts = { workspace = true, features = ["schema_gen", "odbc"] }
schemars.workspace = true
serde_json.workspace = true
65 changes: 65 additions & 0 deletions docs/schema_reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -822,6 +822,7 @@ Must be one of:
| ---------------------------------------- |
| [item 0](#destination_anyOf_i0_oneOf_i0) |
| [item 1](#destination_anyOf_i0_oneOf_i1) |
| [item 2](#destination_anyOf_i0_oneOf_i2) |

#### <a name="destination_anyOf_i0_oneOf_i0"></a>**Field: item 0**

Expand Down Expand Up @@ -1396,6 +1397,70 @@ Must be one of:

**Description:** *No description...*

#### <a name="destination_anyOf_i0_oneOf_i2"></a>**Field: item 2**

| | |
| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| **Type** | `object` |
| **Additional properties** | [![Any type: allowed](https://img.shields.io/badge/Any%20type-allowed-green)](# "Additional Properties of any type are allowed.") |

**Description:** An ODBC insert query to write to a DB table

| Property | Pattern | Type | Title/Description |
| ------------------------------------------------------------------------ | ------- | ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| + [type](#destination_anyOf_i0_oneOf_i2_type ) | No | enum (of string) | - |
| + [name](#destination_anyOf_i0_oneOf_i2_name ) | No | string | Name of the ODBC destination |
| + [connection_string](#destination_anyOf_i0_oneOf_i2_connection_string ) | No | string | ODBC connection string Please reference the respective database connection string syntax (e.g. <https://www.connectionstrings.com/postgresql-odbc-driver-psqlodbc/>) |
| + [batch_size](#destination_anyOf_i0_oneOf_i2_batch_size ) | No | integer | batch size (rows) to use when inserting data |

----------------------------------------------------

##### <a name="destination_anyOf_i0_oneOf_i2_type"></a>Field: type

| | |
| -------- | ------------------ |
| **Type** | `enum (of string)` |

**Description:** *No description...*

Must be one of:
* "Odbc"

----------------------------------------------------

##### <a name="destination_anyOf_i0_oneOf_i2_name"></a>Field: name

| | |
| -------- | -------- |
| **Type** | `string` |

**Description:** Name of the ODBC destination

----------------------------------------------------

##### <a name="destination_anyOf_i0_oneOf_i2_connection_string"></a>Field: connection_string

| | |
| -------- | -------- |
| **Type** | `string` |

**Description:** ODBC connection string Please reference the respective database connection string syntax (e.g. <https://www.connectionstrings.com/postgresql-odbc-driver-psqlodbc/>)

----------------------------------------------------

##### <a name="destination_anyOf_i0_oneOf_i2_batch_size"></a>Field: batch_size

| | |
| ---------- | --------- |
| **Type** | `integer` |
| **Format** | `uint` |

**Description:** batch size (rows) to use when inserting data

| Restrictions | |
| ------------ | --- |
| **Minimum** | N/A |

### <a name="destination_anyOf_i1"></a>**Field: item 1**

| | |
Expand Down
32 changes: 32 additions & 0 deletions json_schema/aqueducts.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,38 @@
}
}
}
},
{
"description": "An ODBC insert query to write to a DB table",
"type": "object",
"required": [
"batch_size",
"connection_string",
"name",
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"Odbc"
]
},
"name": {
"description": "Name of the ODBC destination",
"type": "string"
},
"connection_string": {
"description": "ODBC connection string Please reference the respective database connection string syntax (e.g. <https://www.connectionstrings.com/postgresql-odbc-driver-psqlodbc/>)",
"type": "string"
},
"batch_size": {
"description": "batch size (rows) to use when inserting data",
"type": "integer",
"format": "uint",
"minimum": 0.0
}
}
}
]
},
Expand Down

0 comments on commit 0dc1798

Please sign in to comment.