Skip to content

Commit 2e348c8

Browse files
cursoragentlovasoa
andcommitted
Checkpoint before follow-up message
Co-authored-by: contact <[email protected]>
1 parent 76c9834 commit 2e348c8

File tree

8 files changed

+2
-103
lines changed

8 files changed

+2
-103
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ offline = ["sqlx-macros/offline", "sqlx-core/offline"]
5858

5959
# intended mainly for CI and docs
6060
all = ["tls", "all-databases", "all-types"]
61-
all-databases = ["mysql", "sqlite", "postgres", "mssql", "snowflake", "any"]
61+
all-databases = ["mysql", "sqlite", "postgres", "mssql", "any"]
6262
all-types = [
6363
"bigdecimal",
6464
"decimal",

sqlx-core/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ default = ["migrate"]
2020
migrate = ["sha2", "crc"]
2121

2222
# databases
23-
all-databases = ["postgres", "mysql", "sqlite", "mssql", "snowflake", "any"]
23+
all-databases = ["postgres", "mysql", "sqlite", "mssql", "any"]
2424
postgres = [
2525
"md-5",
2626
"sha2",

sqlx-core/src/any/arguments.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,6 @@ pub(crate) enum AnyArgumentBufferKind<'q> {
4646
crate::mssql::MssqlArguments,
4747
std::marker::PhantomData<&'q ()>,
4848
),
49-
50-
#[cfg(feature = "snowflake")]
51-
Snowflake(
52-
crate::snowflake::SnowflakeArguments,
53-
std::marker::PhantomData<&'q ()>,
54-
),
5549
}
5650

5751
// control flow inferred type bounds would be fun

sqlx-core/src/any/connection/establish.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,6 @@ impl AnyConnection {
3434
.await
3535
.map(AnyConnectionKind::Mssql)
3636
}
37-
38-
#[cfg(feature = "snowflake")]
39-
AnyConnectOptionsKind::Snowflake(options) => {
40-
crate::snowflake::SnowflakeConnection::establish(options)
41-
.await
42-
.map(AnyConnectionKind::Snowflake)
43-
}
4437
}
4538
.map(AnyConnection)
4639
}

sqlx-core/src/any/connection/mod.rs

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@ use crate::mssql;
1515

1616
#[cfg(feature = "mysql")]
1717
use crate::mysql;
18-
19-
#[cfg(feature = "snowflake")]
20-
use crate::snowflake;
21-
2218
use crate::transaction::Transaction;
2319

2420
mod establish;
@@ -52,9 +48,6 @@ pub enum AnyConnectionKind {
5248

5349
#[cfg(feature = "sqlite")]
5450
Sqlite(sqlite::SqliteConnection),
55-
56-
#[cfg(feature = "snowflake")]
57-
Snowflake(snowflake::SnowflakeConnection),
5851
}
5952

6053
impl AnyConnectionKind {
@@ -71,9 +64,6 @@ impl AnyConnectionKind {
7164

7265
#[cfg(feature = "mssql")]
7366
AnyConnectionKind::Mssql(_) => AnyKind::Mssql,
74-
75-
#[cfg(feature = "snowflake")]
76-
AnyConnectionKind::Snowflake(_) => AnyKind::Snowflake,
7767
}
7868
}
7969
}
@@ -104,9 +94,6 @@ macro_rules! delegate_to {
10494

10595
#[cfg(feature = "mssql")]
10696
AnyConnectionKind::Mssql(conn) => conn.$method($($arg),*),
107-
108-
#[cfg(feature = "snowflake")]
109-
AnyConnectionKind::Snowflake(conn) => conn.$method($($arg),*),
11097
}
11198
};
11299
}
@@ -125,9 +112,6 @@ macro_rules! delegate_to_mut {
125112

126113
#[cfg(feature = "mssql")]
127114
AnyConnectionKind::Mssql(conn) => conn.$method($($arg),*),
128-
129-
#[cfg(feature = "snowflake")]
130-
AnyConnectionKind::Snowflake(conn) => conn.$method($($arg),*),
131115
}
132116
};
133117
}
@@ -150,9 +134,6 @@ impl Connection for AnyConnection {
150134

151135
#[cfg(feature = "mssql")]
152136
AnyConnectionKind::Mssql(conn) => conn.close(),
153-
154-
#[cfg(feature = "snowflake")]
155-
AnyConnectionKind::Snowflake(conn) => conn.close(),
156137
}
157138
}
158139

@@ -169,9 +150,6 @@ impl Connection for AnyConnection {
169150

170151
#[cfg(feature = "mssql")]
171152
AnyConnectionKind::Mssql(conn) => conn.close_hard(),
172-
173-
#[cfg(feature = "snowflake")]
174-
AnyConnectionKind::Snowflake(conn) => conn.close_hard(),
175153
}
176154
}
177155

@@ -200,9 +178,6 @@ impl Connection for AnyConnection {
200178
// no cache
201179
#[cfg(feature = "mssql")]
202180
AnyConnectionKind::Mssql(_) => 0,
203-
204-
#[cfg(feature = "snowflake")]
205-
AnyConnectionKind::Snowflake(conn) => conn.cached_statements_size(),
206181
}
207182
}
208183

@@ -220,9 +195,6 @@ impl Connection for AnyConnection {
220195
// no cache
221196
#[cfg(feature = "mssql")]
222197
AnyConnectionKind::Mssql(_) => Box::pin(futures_util::future::ok(())),
223-
224-
#[cfg(feature = "snowflake")]
225-
AnyConnectionKind::Snowflake(conn) => conn.clear_cached_statements(),
226198
}
227199
}
228200

@@ -264,10 +236,3 @@ impl From<sqlite::SqliteConnection> for AnyConnection {
264236
AnyConnection(AnyConnectionKind::Sqlite(conn))
265237
}
266238
}
267-
268-
#[cfg(feature = "snowflake")]
269-
impl From<snowflake::SnowflakeConnection> for AnyConnection {
270-
fn from(conn: snowflake::SnowflakeConnection) -> Self {
271-
AnyConnection(AnyConnectionKind::Snowflake(conn))
272-
}
273-
}

sqlx-core/src/any/kind.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ pub enum AnyKind {
1414

1515
#[cfg(feature = "mssql")]
1616
Mssql,
17-
18-
#[cfg(feature = "snowflake")]
19-
Snowflake,
2017
}
2118

2219
impl FromStr for AnyKind {
@@ -64,16 +61,6 @@ impl FromStr for AnyKind {
6461
Err(Error::Configuration("database URL has the scheme of a MSSQL database but the `mssql` feature is not enabled".into()))
6562
}
6663

67-
#[cfg(feature = "snowflake")]
68-
_ if url.starts_with("snowflake:") => {
69-
Ok(AnyKind::Snowflake)
70-
}
71-
72-
#[cfg(not(feature = "snowflake"))]
73-
_ if url.starts_with("snowflake:") => {
74-
Err(Error::Configuration("database URL has the scheme of a Snowflake database but the `snowflake` feature is not enabled".into()))
75-
}
76-
7764
_ => Err(Error::Configuration(format!("unrecognized database url: {:?}", url).into()))
7865
}
7966
}

sqlx-core/src/any/mod.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,6 @@ where
8282

8383
#[cfg(feature = "sqlite")]
8484
arguments::AnyArgumentBufferKind::Sqlite(args) => args.add(self),
85-
86-
#[cfg(feature = "snowflake")]
87-
arguments::AnyArgumentBufferKind::Snowflake(args, _) => args.add(self),
8885
}
8986

9087
// unused

sqlx-core/src/any/options.rs

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ use crate::any::kind::AnyKind;
1919
#[cfg(feature = "mssql")]
2020
use crate::mssql::MssqlConnectOptions;
2121

22-
#[cfg(feature = "snowflake")]
23-
use crate::snowflake::SnowflakeConnectOptions;
24-
2522
/// Opaque options for connecting to a database. These may only be constructed by parsing from
2623
/// a connection url.
2724
///
@@ -46,9 +43,6 @@ impl AnyConnectOptions {
4643

4744
#[cfg(feature = "mssql")]
4845
AnyConnectOptionsKind::Mssql(_) => AnyKind::Mssql,
49-
50-
#[cfg(feature = "snowflake")]
51-
AnyConnectOptionsKind::Snowflake(_) => AnyKind::Snowflake,
5246
}
5347
}
5448
}
@@ -114,12 +108,6 @@ try_from_any_connect_options_to!(
114108
#[cfg(feature = "mssql")]
115109
try_from_any_connect_options_to!(MssqlConnectOptions, AnyConnectOptionsKind::Mssql, "mssql");
116110

117-
#[cfg(feature = "snowflake")]
118-
try_from_any_connect_options_to!(
119-
SnowflakeConnectOptions,
120-
AnyConnectOptionsKind::Snowflake,
121-
"snowflake"
122-
);
123111

124112
#[derive(Debug, Clone)]
125113
pub(crate) enum AnyConnectOptionsKind {
@@ -134,9 +122,6 @@ pub(crate) enum AnyConnectOptionsKind {
134122

135123
#[cfg(feature = "mssql")]
136124
Mssql(MssqlConnectOptions),
137-
138-
#[cfg(feature = "snowflake")]
139-
Snowflake(SnowflakeConnectOptions),
140125
}
141126

142127
#[cfg(feature = "postgres")]
@@ -167,13 +152,6 @@ impl From<MssqlConnectOptions> for AnyConnectOptions {
167152
}
168153
}
169154

170-
#[cfg(feature = "snowflake")]
171-
impl From<SnowflakeConnectOptions> for AnyConnectOptions {
172-
fn from(options: SnowflakeConnectOptions) -> Self {
173-
Self(AnyConnectOptionsKind::Snowflake(options))
174-
}
175-
}
176-
177155
impl FromStr for AnyConnectOptions {
178156
type Err = Error;
179157

@@ -194,11 +172,6 @@ impl FromStr for AnyConnectOptions {
194172

195173
#[cfg(feature = "mssql")]
196174
AnyKind::Mssql => MssqlConnectOptions::from_str(url).map(AnyConnectOptionsKind::Mssql),
197-
198-
#[cfg(feature = "snowflake")]
199-
AnyKind::Snowflake => {
200-
SnowflakeConnectOptions::from_str(url).map(AnyConnectOptionsKind::Snowflake)
201-
}
202175
}
203176
.map(AnyConnectOptions)
204177
}
@@ -233,11 +206,6 @@ impl ConnectOptions for AnyConnectOptions {
233206
AnyConnectOptionsKind::Mssql(o) => {
234207
o.log_statements(level);
235208
}
236-
237-
#[cfg(feature = "snowflake")]
238-
AnyConnectOptionsKind::Snowflake(o) => {
239-
o.log_statements(level);
240-
}
241209
};
242210
self
243211
}
@@ -263,11 +231,6 @@ impl ConnectOptions for AnyConnectOptions {
263231
AnyConnectOptionsKind::Mssql(o) => {
264232
o.log_slow_statements(level, duration);
265233
}
266-
267-
#[cfg(feature = "snowflake")]
268-
AnyConnectOptionsKind::Snowflake(o) => {
269-
o.log_slow_statements(level, duration);
270-
}
271234
};
272235
self
273236
}

0 commit comments

Comments
 (0)