You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/guides/driver_list.md
+52Lines changed: 52 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -112,6 +112,58 @@ $ cat dbc.toml
112
112
version = '=0.1.0'
113
113
```
114
114
115
+
## Pre-release Versions
116
+
117
+
{{ since_version('v0.2.0') }}
118
+
119
+
### Allowing Pre-release Versions
120
+
121
+
By default, when you add a driver to a driver list, dbc will only consider stable (non-pre-release) versions. If you want to allow pre-release versions when running `dbc sync`, use the `--pre` flag with `dbc add`:
122
+
123
+
```console
124
+
$ dbc add --pre mysql
125
+
added mysql to driver list
126
+
use `dbc sync` to install the drivers in the list
127
+
$ cat dbc.toml
128
+
[drivers]
129
+
[drivers.mysql]
130
+
prerelease = 'allow'
131
+
```
132
+
133
+
The `prerelease = 'allow'` field tells `dbc sync` to consider pre-release versions when resolving which version to install.
134
+
135
+
!!! note
136
+
The `prerelease = 'allow'` field only affects implicit version resolution. When your version constraint unambiguously references a pre-release (by including a pre-release suffix like `-beta.1`), that constraint will match pre-release versions regardless of the `prerelease` field.
137
+
138
+
### Adding Specific Pre-release Versions
139
+
140
+
You can add a driver with a version constraint that references a specific pre-release version without using the `--pre` flag. When your version constraint unambiguously references a pre-release by including a pre-release suffix, the `prerelease` field is not added:
141
+
142
+
```console
143
+
$ dbc add "mysql=1.0.0-beta.1"
144
+
added mysql to driver list with constraint =1.0.0-beta.1
145
+
use `dbc sync` to install the drivers in the list
146
+
$ cat dbc.toml
147
+
[drivers]
148
+
[drivers.mysql]
149
+
version = '=1.0.0-beta.1'
150
+
```
151
+
152
+
The version constraint `=1.0.0-beta.1` unambiguously indicates you want a pre-release, so `prerelease = 'allow'` is not needed.
153
+
154
+
However, if your version constraint is ambiguous and only a pre-release version satisfies it, `dbc sync` will fail rather than install the pre-release. For example, if a driver has versions `0.1.0` and `0.1.1-beta.1`:
155
+
156
+
```toml
157
+
[drivers.mysql]
158
+
version = '>0.1.0'
159
+
# dbc sync will FAIL, not install 0.1.1-beta.1
160
+
```
161
+
162
+
To allow `0.1.1-beta.1` to be installed in this case, you must either:
163
+
164
+
- Use `dbc add --pre` to add `prerelease = 'allow'`
165
+
- Change the constraint to reference the pre-release: `version = '>=0.1.1-beta.1'`
166
+
115
167
## Removing Drivers
116
168
117
169
Drivers can be removed from a driver list with the `dbc remove` command:
Copy file name to clipboardExpand all lines: docs/guides/finding_drivers.md
+39Lines changed: 39 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -172,3 +172,42 @@ $ dbc search --verbose
172
172
Available Versions:
173
173
╰── 0.1.1
174
174
```
175
+
176
+
### Pre-release Versions
177
+
178
+
{{ since_version('v0.2.0') }}
179
+
180
+
By default, `dbc search` hides pre-release versions from search results. Pre-release versions follow semantic versioning conventions and include version identifiers like `1.0.0-alpha.1`, `2.0.0-beta.3`, or `1.5.0-rc.1`.
181
+
182
+
To include pre-release versions in search results, use the `--pre` flag:
183
+
184
+
```console
185
+
$ dbc search --pre
186
+
```
187
+
188
+
Without `--pre`, `dbc search` will:
189
+
190
+
- Hide drivers that have exclusively pre-release versions (no stable versions)
191
+
- Exclude pre-release versions from the available versions list
192
+
193
+
With `--pre`, `dbc search` will:
194
+
195
+
- Show drivers even if they have exclusively pre-release versions
196
+
- Include pre-release versions in the available versions list when using `--verbose`
197
+
198
+
For example, with `--pre --verbose`:
199
+
200
+
```console
201
+
$ dbc search --pre --verbose mysql
202
+
• mysql
203
+
Title: ADBC Driver Foundry Driver for MySQL
204
+
Description: An ADBC Driver for MySQL developed by the ADBC Driver Foundry
205
+
License: Apache-2.0
206
+
Available Versions:
207
+
├── 0.1.0
208
+
├── 0.2.0-beta.1
209
+
╰── 0.2.0
210
+
```
211
+
212
+
!!! note
213
+
Using the `--pre` flag with `dbc search` only affects the visibility of pre-release versions in search results. To actually install a pre-release version, you need to either use `--pre` with `dbc install` or use a version constraint that unambiguously references a pre-release (by including a pre-release suffix like `-beta.1`).
Copy file name to clipboardExpand all lines: docs/guides/installing.md
+40Lines changed: 40 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -74,6 +74,46 @@ The syntax for specifying a version may be familiar to you if you've used other
74
74
!!! note
75
75
dbc uses the [github.com/Masterminds/semver/v3](https://pkg.go.dev/github.com/Masterminds/semver/v3#section-readme) package whose README has a good overview of the syntax it allows. In short, you can use `=`, `!=`, `>`, `<`, `>=`, `<=`, `~`, `^`, ranges like `1.2 - 1.4.5`, and wildcards (`x`, `X`, or `*`).
76
76
77
+
## Pre-release Versions
78
+
79
+
{{ since_version('v0.2.0') }}
80
+
81
+
### Allowing Pre-release Versions
82
+
83
+
By default, dbc acts as if pre-release versions don't exist when searching for and installing drivers. Pre-release versions follow semantic versioning conventions and include version identifiers like `1.0.0-alpha.1`, `2.0.0-beta.3`, or `1.5.0-rc.1`.
84
+
85
+
To allow dbc to install a pre-release version when it's the newest version available, use the `--pre` flag:
86
+
87
+
```console
88
+
$ dbc install --pre mysql
89
+
```
90
+
91
+
This will allow dbc to consider pre-release versions when selecting the latest version to install.
92
+
93
+
!!! note
94
+
The `--pre` flag allows dbc to install a pre-release version when you didn't ask for it explicitly. Without `--pre`, your version constraint must contain a pre-release suffix (like `-beta.1`) for dbc to consider pre-release versions.
95
+
96
+
### Installing Specific Pre-release Versions
97
+
98
+
You can install a specific pre-release version without using the `--pre` flag if your version constraint unambiguously references a pre-release by including a pre-release suffix:
99
+
100
+
```console
101
+
$ dbc install "mysql=1.0.0-beta.1"
102
+
$ dbc install "mysql>=1.0.0-beta.1"
103
+
```
104
+
105
+
However, if your version constraint is ambiguous and only a pre-release version satisfies it, dbc will fail rather than install the pre-release. For example, if a driver has versions `0.1.0` and `0.1.1-beta.1`:
106
+
107
+
```console
108
+
$ dbc install "mysql>0.1.0"
109
+
# This will FAIL, not install 0.1.1-beta.1
110
+
```
111
+
112
+
To install `0.1.1-beta.1` in this case, you must either:
113
+
114
+
- Use `--pre`: `dbc install --pre "mysql>0.1.0"`
115
+
- Reference the pre-release explicitly: `dbc install "mysql>=0.1.1-beta.1"`
116
+
77
117
## Updating a Driver
78
118
79
119
dbc doesn't offer a specific "update" or "upgrade" command but `dbc install` can do essentially the same thing.
Copy file name to clipboardExpand all lines: docs/reference/driver_list.md
+50-3Lines changed: 50 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,15 +19,16 @@ limitations under the License.
19
19
`dbc.toml` is the default filename dbc uses for a [driver list](../concepts/driver_list.md). This page outlines the structure of that file.
20
20
21
21
This file uses the [TOML](https://toml.io) file format and contains a single TOML Table called "drivers".
22
-
Each driver must have a name and may optionally have a version constraint. See [Version Constraints](../guides/installing.md#version-constraints) to learn how to specify version constraints.
22
+
Each driver must have a name and may optionally have a version constraint and pre-release setting. See [Version Constraints](../guides/installing.md#version-constraints) to learn how to specify version constraints.
23
23
24
24
## Example
25
25
26
26
The following driver list specifies:
27
27
28
-
- Whatever is the latest version of the "mysql" driver
28
+
- Whatever is the latest stable version of the "mysql" driver
29
29
- The exact 1.4.0 version of the "duckdb" driver
30
-
- The latest version in the 1.x.x major series for the "postgresql" driver.
30
+
- The latest stable version in the 1.x.x major series for the "postgresql" driver
31
+
- The latest version (including pre-releases) of the "snowflake" driver
31
32
32
33
```toml
33
34
[drivers]
@@ -39,4 +40,50 @@ version = '=1.4.0'
39
40
40
41
[drivers.postgresql]
41
42
version = '=1.x.x'
43
+
44
+
[drivers.snowflake]
45
+
prerelease = 'allow'
46
+
```
47
+
48
+
## Fields
49
+
50
+
### `version`
51
+
52
+
Optional. A version constraint string that specifies which versions of the driver are acceptable. If omitted, dbc will use the latest stable version available.
53
+
54
+
See [Version Constraints](../guides/installing.md#version-constraints) for the full syntax.
55
+
56
+
### `prerelease`
57
+
58
+
{{ since_version('v0.2.0') }}
59
+
60
+
Optional. Controls whether pre-release versions should be considered during version resolution.
61
+
62
+
- When set to `'allow'`, dbc will consider pre-release versions when selecting which version to install
63
+
- When omitted or set to any other value, only stable (non-pre-release) versions will be considered
64
+
65
+
This field is typically set automatically when using `dbc add --pre`.
66
+
67
+
**Example:**
68
+
69
+
```toml
70
+
[drivers.mysql]
71
+
prerelease = 'allow'
72
+
```
73
+
74
+
**Interaction with version constraints:**
75
+
76
+
The `prerelease` field only affects implicit version resolution. When your `version` constraint unambiguously references a pre-release by including a pre-release suffix (like `version = '>=1.0.0-beta.1'`), pre-release versions will be considered regardless of this field.
77
+
78
+
However, if your version constraint is ambiguous and only pre-release versions satisfy it, `dbc sync` will fail unless `prerelease = 'allow'` is set. For example, if a driver has versions `0.1.0` and `0.1.1-beta.1`:
79
+
80
+
```toml
81
+
[drivers.mysql]
82
+
version = '>0.1.0'
83
+
# This will FAIL during sync, not install 0.1.1-beta.1
42
84
```
85
+
86
+
To allow the pre-release in this case, either:
87
+
88
+
- Add `prerelease = 'allow'`
89
+
- Change the constraint to reference the pre-release: `version = '>=0.1.1-beta.1'`
0 commit comments