Skip to content

Commit 9432a1e

Browse files
committed
♻️ [refactor] Argumentsからlifetime parameterを削除する launchbadge/sqlx#3958
1 parent 1cae7c2 commit 9432a1e

28 files changed

+456
-292
lines changed

README.md

Lines changed: 19 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -76,20 +76,16 @@ scylladb://myname:mypassword@localhost:9042/my_keyspace?nodes=example.test,examp
7676

7777
### Basic type binding
7878

79-
- [x] ASCII (&str, String)
80-
- [ ] Box\<str>
81-
- [ ] Arc\<str>
82-
- [x] TEXT (&str, String)
83-
- [ ] Box\<str>
84-
- [ ] Arc\<str>
79+
- [x] ASCII (&str, String, Box\<str>, Cow\<'_, str>, Rc\<str>, Arc\<str>)
80+
- [x] TEXT (&str, String, Box\<str>, Cow\<'_, str>, Rc\<str>, Arc\<str>)
8581
- [x] BOOLEAN (bool)
8682
- [x] TINYINT (i8)
8783
- [x] SMALLINT (i16)
8884
- [x] INT (i32)
8985
- [x] BIGINT (i64)
9086
- [x] FLOAT (f32)
9187
- [x] DOUBLE (f64)
92-
- [x] BLOB (&[u8], Vec\<u8>)
88+
- [x] BLOB (Vec\<u8>, Vec\<u8>)
9389
- [x] UUID (uuid::Uuid)
9490
- [x] TIMEUUID (scylla::value::CqlTimeuuid)
9591
- [x] TIMESTAMP (scylla::value::CqlTimestamp, chrono::DateTime\<Utc>, time::OffsetDateTime)
@@ -104,24 +100,22 @@ scylladb://myname:mypassword@localhost:9042/my_keyspace?nodes=example.test,examp
104100

105101
### List or Set type binding
106102

107-
To avoid additional memory allocation, only borrowing is supported.
108-
109-
- [x] LIST\<ASCII>, SET\<ASCII> (&[&str], &[String])
110-
- [x] LIST\<TEXT>, SET\<TEXT> (&[&str], &[String])
111-
- [x] LIST\<BOOLEAN>, SET\<BOOLEAN> (&[bool])
112-
- [x] LIST\<TINYINT>, SET\<TINYINT> (&[i8])
113-
- [x] LIST\<SMALLINT>, SET\<SMALLINT> (&[i16])
114-
- [x] LIST\<INT>, SET\<INT> (&[i32])
115-
- [x] LIST\<BIGINT>, SET\<BIGINT> (&[i64])
116-
- [x] LIST\<FLOAT>, SET\<FLOAT> (&[f32])
117-
- [x] LIST\<DOUBLE>, SET\<DOUBLE> (&[f64])
118-
- [x] LIST\<UUID>, SET\<UUID> (&[uuid::Uuid])
119-
- [x] LIST\<TIMEUUID>, SET\<TIMEUUID> (&[scylla::value::CqlTimeuuid])
120-
- [x] LIST\<TIMESTAMP>, SET\<TIMESTAMP> (&[scylla::value::CqlTimestamp], &[chrono::DateTime\<Utc>], &[time::OffsetDateTime])
121-
- [x] LIST\<DATE>, SET\<DATE> (&[scylla::value::CqlDate], &[chrono::NaiveDate], &[time::Date])
122-
- [x] LIST\<TIME>, SET\<TIME> (&[scylla::value::CqlTime], &[chrono::NaiveTime], &[time::Time])
123-
- [ ] LIST\<INET>, SET\<INET> (&[std::net::IpAddr])
124-
- [x] LIST\<DECIMAL>, SET\<DECIMAL> (&[bigdecimal::Decimal])
103+
- [x] LIST\<ASCII>, SET\<ASCII> ([&str], Vec\<String>)
104+
- [x] LIST\<TEXT>, SET\<TEXT> ([&str], Vec\<String>)
105+
- [x] LIST\<BOOLEAN>, SET\<BOOLEAN> (Vec\<bool>)
106+
- [x] LIST\<TINYINT>, SET\<TINYINT> (Vec\<i8>)
107+
- [x] LIST\<SMALLINT>, SET\<SMALLINT> (Vec\<i16>)
108+
- [x] LIST\<INT>, SET\<INT> (Vec\<i32>)
109+
- [x] LIST\<BIGINT>, SET\<BIGINT> (Vec\<i64>)
110+
- [x] LIST\<FLOAT>, SET\<FLOAT> (Vec\<f32>)
111+
- [x] LIST\<DOUBLE>, SET\<DOUBLE> (Vec\<f64>)
112+
- [x] LIST\<UUID>, SET\<UUID> (Vec\<uuid::Uuid>)
113+
- [x] LIST\<TIMEUUID>, SET\<TIMEUUID> (Vec\<scylla::value::CqlTimeuuid>)
114+
- [x] LIST\<TIMESTAMP>, SET\<TIMESTAMP> (Vec\<scylla::value::CqlTimestamp>, Vec\<chrono::DateTime\<Utc>>, Vec\<time::OffsetDateTime>)
115+
- [x] LIST\<DATE>, SET\<DATE> (Vec\<scylla::value::CqlDate>, Vec\<chrono::NaiveDate>, Vec\<time::Date>)
116+
- [x] LIST\<TIME>, SET\<TIME> (Vec\<scylla::value::CqlTime>, Vec\<chrono::NaiveTime>, Vec\<time::Time>)
117+
- [x] LIST\<INET>, SET\<INET> (Vec\<std::net::IpAddr>)
118+
- [x] LIST\<DECIMAL>, SET\<DECIMAL> (Vec\<bigdecimal::Decimal>)
125119
- [ ] scylla::value::CqlDecimal
126120
- [ ] Duration
127121
- [ ] Varint

sqlx-scylladb/src/any.rs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use std::{borrow::Cow, pin::pin};
1+
use std::{borrow::Cow, pin::pin, sync::Arc};
22

33
use futures_core::{future::BoxFuture, stream::BoxStream};
44
use futures_util::{StreamExt, TryFutureExt, TryStreamExt};
@@ -240,7 +240,7 @@ impl<'a> TryFrom<&'a ScyllaDBRow> for AnyRow {
240240
}
241241
}
242242

243-
fn map_arguments(args: AnyArguments<'_>) -> ScyllaDBArguments<'_> {
243+
fn map_arguments(args: AnyArguments<'_>) -> ScyllaDBArguments {
244244
let capacity = args.values.0.capacity();
245245
let mut types = Vec::with_capacity(capacity);
246246
let mut buffer = Vec::with_capacity(capacity);
@@ -256,8 +256,14 @@ fn map_arguments(args: AnyArguments<'_>) -> ScyllaDBArguments<'_> {
256256
AnyValueKind::BigInt(i) => (ScyllaDBTypeInfo::BigInt, ScyllaDBArgument::BigInt(i)),
257257
AnyValueKind::Real(r) => (ScyllaDBTypeInfo::Float, ScyllaDBArgument::Float(r)),
258258
AnyValueKind::Double(d) => (ScyllaDBTypeInfo::Double, ScyllaDBArgument::Double(d)),
259-
AnyValueKind::Text(t) => (ScyllaDBTypeInfo::Text, ScyllaDBArgument::Text(t)),
260-
AnyValueKind::Blob(b) => (ScyllaDBTypeInfo::Blob, ScyllaDBArgument::Blob(b)),
259+
AnyValueKind::Text(t) => (
260+
ScyllaDBTypeInfo::Text,
261+
ScyllaDBArgument::Text(Arc::new(t.to_string())),
262+
),
263+
AnyValueKind::Blob(b) => (
264+
ScyllaDBTypeInfo::Blob,
265+
ScyllaDBArgument::Blob(Arc::new(b.to_vec())),
266+
),
261267
// AnyValueKind is `#[non_exhaustive]` but we should have covered everything
262268
_ => unreachable!("BUG: missing mapping for {val:?}"),
263269
};

sqlx-scylladb/src/arguments.rs

Lines changed: 78 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use std::{
2-
borrow::Cow,
32
collections::HashMap,
43
net::IpAddr,
54
ops::{Deref, DerefMut},
5+
sync::Arc,
66
};
77

88
use scylla::{
@@ -21,12 +21,12 @@ use uuid::Uuid;
2121
use crate::{ScyllaDB, ScyllaDBTypeInfo};
2222

2323
#[derive(Default)]
24-
pub struct ScyllaDBArguments<'q> {
24+
pub struct ScyllaDBArguments {
2525
pub(crate) types: Vec<ScyllaDBTypeInfo>,
26-
pub(crate) buffer: ScyllaDBArgumentBuffer<'q>,
26+
pub(crate) buffer: ScyllaDBArgumentBuffer,
2727
}
2828

29-
impl<'q> Arguments<'q> for ScyllaDBArguments<'q> {
29+
impl<'q> Arguments<'q> for ScyllaDBArguments {
3030
type Database = ScyllaDB;
3131

3232
fn reserve(&mut self, additional: usize, size: usize) {
@@ -39,7 +39,7 @@ impl<'q> Arguments<'q> for ScyllaDBArguments<'q> {
3939
T: 'q + sqlx::Encode<'q, Self::Database> + sqlx::Type<Self::Database>,
4040
{
4141
let ty = value.produces().unwrap_or_else(T::type_info);
42-
let _ = value.encode_by_ref(&mut self.buffer)?;
42+
let _ = value.encode(&mut self.buffer)?;
4343
self.types.push(ty);
4444

4545
Ok(())
@@ -51,7 +51,7 @@ impl<'q> Arguments<'q> for ScyllaDBArguments<'q> {
5151
}
5252
}
5353

54-
impl<'q> SerializeRow for ScyllaDBArguments<'q> {
54+
impl SerializeRow for ScyllaDBArguments {
5555
fn serialize(
5656
&self,
5757
ctx: &RowSerializationContext<'_>,
@@ -76,108 +76,107 @@ impl<'q> SerializeRow for ScyllaDBArguments<'q> {
7676
}
7777

7878
#[derive(Default)]
79-
pub struct ScyllaDBArgumentBuffer<'q> {
80-
pub(crate) buffer: Vec<ScyllaDBArgument<'q>>,
79+
pub struct ScyllaDBArgumentBuffer {
80+
pub(crate) buffer: Vec<ScyllaDBArgument>,
8181
}
8282

83-
impl<'q> Deref for ScyllaDBArgumentBuffer<'q> {
84-
type Target = Vec<ScyllaDBArgument<'q>>;
83+
impl Deref for ScyllaDBArgumentBuffer {
84+
type Target = Vec<ScyllaDBArgument>;
8585

8686
fn deref(&self) -> &Self::Target {
8787
&self.buffer
8888
}
8989
}
9090

91-
impl<'q> DerefMut for ScyllaDBArgumentBuffer<'q> {
91+
impl<'q> DerefMut for ScyllaDBArgumentBuffer {
9292
fn deref_mut(&mut self) -> &mut Self::Target {
9393
&mut self.buffer
9494
}
9595
}
9696

97-
pub enum ScyllaDBArgument<'q> {
97+
pub enum ScyllaDBArgument {
9898
Null,
9999
Boolean(bool),
100-
BooleanArray(&'q [bool]),
100+
BooleanArray(Arc<Vec<bool>>),
101101
TinyInt(i8),
102-
TinyIntArray(&'q [i8]),
102+
TinyIntArray(Arc<Vec<i8>>),
103103
SmallInt(i16),
104-
SmallIntArray(&'q [i16]),
104+
SmallIntArray(Arc<Vec<i16>>),
105105
Int(i32),
106-
IntArray(&'q [i32]),
106+
IntArray(Arc<Vec<i32>>),
107107
BigInt(i64),
108-
BigIntArray(&'q [i64]),
108+
BigIntArray(Arc<Vec<i64>>),
109109
Float(f32),
110-
FloatArray(&'q [f32]),
110+
FloatArray(Arc<Vec<f32>>),
111111
Double(f64),
112-
DoubleArray(&'q [f64]),
113-
Text(Cow<'q, str>),
114-
TextArray(&'q [String]),
115-
TextRefArray(&'q [&'q str]),
116-
Blob(Cow<'q, [u8]>),
112+
DoubleArray(Arc<Vec<f64>>),
113+
Text(Arc<String>),
114+
TextArray(Arc<Vec<String>>),
115+
Blob(Arc<Vec<u8>>),
117116
Uuid(Uuid),
118-
UuidArray(&'q [Uuid]),
117+
UuidArray(Arc<Vec<Uuid>>),
119118
Timeuuid(CqlTimeuuid),
120-
TimeuuidArray(&'q [CqlTimeuuid]),
119+
TimeuuidArray(Arc<Vec<CqlTimeuuid>>),
121120
IpAddr(IpAddr),
122-
IpAddrArray(&'q [IpAddr]),
121+
IpAddrArray(Arc<Vec<IpAddr>>),
123122
#[cfg(feature = "bigdecimal-04")]
124123
BigDecimal(bigdecimal_04::BigDecimal),
125124
#[cfg(feature = "bigdecimal-04")]
126-
BigDecimalArray(&'q [bigdecimal_04::BigDecimal]),
125+
BigDecimalArray(Arc<Vec<bigdecimal_04::BigDecimal>>),
127126
CqlTimestamp(CqlTimestamp),
128-
CqlTimestampArray(&'q [CqlTimestamp]),
127+
CqlTimestampArray(Arc<Vec<CqlTimestamp>>),
129128
#[cfg(feature = "time-03")]
130129
OffsetDateTime(time_03::OffsetDateTime),
131130
#[cfg(feature = "time-03")]
132-
OffsetDateTimeArray(&'q [time_03::OffsetDateTime]),
131+
OffsetDateTimeArray(Arc<Vec<time_03::OffsetDateTime>>),
133132
#[cfg(feature = "chrono-04")]
134133
ChronoDateTimeUTC(chrono_04::DateTime<chrono_04::Utc>),
135134
#[cfg(feature = "chrono-04")]
136-
ChronoDateTimeUTCArray(&'q [chrono_04::DateTime<chrono_04::Utc>]),
135+
ChronoDateTimeUTCArray(Arc<Vec<chrono_04::DateTime<chrono_04::Utc>>>),
137136
CqlDate(CqlDate),
138-
CqlDateArray(&'q [CqlDate]),
137+
CqlDateArray(Arc<Vec<CqlDate>>),
139138
#[cfg(feature = "time-03")]
140139
Date(time_03::Date),
141140
#[cfg(feature = "time-03")]
142-
DateArray(&'q [time_03::Date]),
141+
DateArray(Arc<Vec<time_03::Date>>),
143142
#[cfg(feature = "chrono-04")]
144143
ChronoNaiveDate(chrono_04::NaiveDate),
145144
#[cfg(feature = "chrono-04")]
146-
ChronoNaiveDateArray(&'q [chrono_04::NaiveDate]),
145+
ChronoNaiveDateArray(Arc<Vec<chrono_04::NaiveDate>>),
147146
CqlTime(CqlTime),
148-
CqlTimeArray(&'q [CqlTime]),
147+
CqlTimeArray(Arc<Vec<CqlTime>>),
149148
#[cfg(feature = "time-03")]
150149
Time(time_03::Time),
151150
#[cfg(feature = "time-03")]
152-
TimeArray(&'q [time_03::Time]),
151+
TimeArray(Arc<Vec<time_03::Time>>),
153152
#[cfg(feature = "chrono-04")]
154153
ChronoNaiveTime(chrono_04::NaiveTime),
155154
#[cfg(feature = "chrono-04")]
156-
ChronoNaiveTimeArray(&'q [chrono_04::NaiveTime]),
157-
Tuple(Box<dyn SerializeValue + Send + Sync + 'q>),
158-
UserDefinedType(&'q (dyn SerializeValue + Send + Sync)),
159-
UserDefinedTypeArray(&'q (dyn SerializeValue + Send + Sync)),
160-
TextTextMap(&'q HashMap<String, String>),
161-
TextBooleanMap(&'q HashMap<String, bool>),
162-
TextTinyIntMap(&'q HashMap<String, i8>),
163-
TextSmallIntMap(&'q HashMap<String, i16>),
164-
TextIntMap(&'q HashMap<String, i32>),
165-
TextBigIntMap(&'q HashMap<String, i64>),
166-
TextFloatMap(&'q HashMap<String, f32>),
167-
TextDoubleMap(&'q HashMap<String, f64>),
168-
TextUuidMap(&'q HashMap<String, Uuid>),
169-
UuidTextMap(&'q HashMap<Uuid, String>),
170-
UuidBooleanMap(&'q HashMap<Uuid, bool>),
171-
UuidTinyIntMap(&'q HashMap<Uuid, i8>),
172-
UuidSmallIntMap(&'q HashMap<Uuid, i16>),
173-
UuidIntMap(&'q HashMap<Uuid, i32>),
174-
UuidBigIntMap(&'q HashMap<Uuid, i64>),
175-
UuidFloatMap(&'q HashMap<Uuid, f32>),
176-
UuidDoubleMap(&'q HashMap<Uuid, f64>),
177-
UuidUuidMap(&'q HashMap<Uuid, Uuid>),
155+
ChronoNaiveTimeArray(Arc<Vec<chrono_04::NaiveTime>>),
156+
Tuple(Arc<dyn SerializeValue + Send + Sync>),
157+
UserDefinedType(Arc<dyn SerializeValue + Send + Sync>),
158+
UserDefinedTypeArray(Arc<dyn SerializeValue + Send + Sync>),
159+
TextTextMap(Arc<HashMap<String, String>>),
160+
TextBooleanMap(Arc<HashMap<String, bool>>),
161+
TextTinyIntMap(Arc<HashMap<String, i8>>),
162+
TextSmallIntMap(Arc<HashMap<String, i16>>),
163+
TextIntMap(Arc<HashMap<String, i32>>),
164+
TextBigIntMap(Arc<HashMap<String, i64>>),
165+
TextFloatMap(Arc<HashMap<String, f32>>),
166+
TextDoubleMap(Arc<HashMap<String, f64>>),
167+
TextUuidMap(Arc<HashMap<String, Uuid>>),
168+
UuidTextMap(Arc<HashMap<Uuid, String>>),
169+
UuidBooleanMap(Arc<HashMap<Uuid, bool>>),
170+
UuidTinyIntMap(Arc<HashMap<Uuid, i8>>),
171+
UuidSmallIntMap(Arc<HashMap<Uuid, i16>>),
172+
UuidIntMap(Arc<HashMap<Uuid, i32>>),
173+
UuidBigIntMap(Arc<HashMap<Uuid, i64>>),
174+
UuidFloatMap(Arc<HashMap<Uuid, f32>>),
175+
UuidDoubleMap(Arc<HashMap<Uuid, f64>>),
176+
UuidUuidMap(Arc<HashMap<Uuid, Uuid>>),
178177
}
179178

180-
impl<'q> SerializeValue for ScyllaDBArgument<'q> {
179+
impl SerializeValue for ScyllaDBArgument {
181180
fn serialize<'b>(
182181
&self,
183182
typ: &ColumnType,
@@ -199,10 +198,9 @@ impl<'q> SerializeValue for ScyllaDBArgument<'q> {
199198
Self::FloatArray(value) => <_ as SerializeValue>::serialize(value, typ, writer),
200199
Self::Double(value) => <_ as SerializeValue>::serialize(value, typ, writer),
201200
Self::DoubleArray(value) => <_ as SerializeValue>::serialize(value, typ, writer),
202-
Self::Text(value) => <_ as SerializeValue>::serialize(&&**value, typ, writer),
201+
Self::Text(value) => <_ as SerializeValue>::serialize(value, typ, writer),
203202
Self::TextArray(value) => <_ as SerializeValue>::serialize(value, typ, writer),
204-
Self::TextRefArray(value) => <_ as SerializeValue>::serialize(value, typ, writer),
205-
Self::Blob(value) => <_ as SerializeValue>::serialize(&&**value, typ, writer),
203+
Self::Blob(value) => <_ as SerializeValue>::serialize(value, typ, writer),
206204
Self::Uuid(uuid) => <_ as SerializeValue>::serialize(uuid, typ, writer),
207205
Self::UuidArray(value) => <_ as SerializeValue>::serialize(value, typ, writer),
208206
Self::Timeuuid(timeuuid) => <_ as SerializeValue>::serialize(timeuuid, typ, writer),
@@ -251,29 +249,29 @@ impl<'q> SerializeValue for ScyllaDBArgument<'q> {
251249
Self::ChronoNaiveDateArray(value) => {
252250
<_ as SerializeValue>::serialize(value, typ, writer)
253251
}
254-
Self::Tuple(dynamic) => <_ as SerializeValue>::serialize(dynamic, typ, writer),
252+
Self::Tuple(value) => <_ as SerializeValue>::serialize(value, typ, writer),
255253
Self::UserDefinedType(value) => <_ as SerializeValue>::serialize(value, typ, writer),
256254
Self::UserDefinedTypeArray(value) => {
257255
<_ as SerializeValue>::serialize(value, typ, writer)
258256
}
259-
Self::TextTextMap(value) => <_ as SerializeValue>::serialize(&**value, typ, writer),
260-
Self::TextBooleanMap(value) => <_ as SerializeValue>::serialize(&**value, typ, writer),
261-
Self::TextTinyIntMap(value) => <_ as SerializeValue>::serialize(&**value, typ, writer),
262-
Self::TextSmallIntMap(value) => <_ as SerializeValue>::serialize(&**value, typ, writer),
263-
Self::TextIntMap(value) => <_ as SerializeValue>::serialize(&**value, typ, writer),
264-
Self::TextBigIntMap(value) => <_ as SerializeValue>::serialize(&**value, typ, writer),
265-
Self::TextFloatMap(value) => <_ as SerializeValue>::serialize(&**value, typ, writer),
266-
Self::TextDoubleMap(value) => <_ as SerializeValue>::serialize(&**value, typ, writer),
267-
Self::TextUuidMap(value) => <_ as SerializeValue>::serialize(&**value, typ, writer),
268-
Self::UuidTextMap(value) => <_ as SerializeValue>::serialize(&**value, typ, writer),
269-
Self::UuidBooleanMap(value) => <_ as SerializeValue>::serialize(&**value, typ, writer),
270-
Self::UuidTinyIntMap(value) => <_ as SerializeValue>::serialize(&**value, typ, writer),
271-
Self::UuidSmallIntMap(value) => <_ as SerializeValue>::serialize(&**value, typ, writer),
272-
Self::UuidIntMap(value) => <_ as SerializeValue>::serialize(&**value, typ, writer),
273-
Self::UuidBigIntMap(value) => <_ as SerializeValue>::serialize(&**value, typ, writer),
274-
Self::UuidFloatMap(value) => <_ as SerializeValue>::serialize(&**value, typ, writer),
275-
Self::UuidDoubleMap(value) => <_ as SerializeValue>::serialize(&**value, typ, writer),
276-
Self::UuidUuidMap(value) => <_ as SerializeValue>::serialize(&**value, typ, writer),
257+
Self::TextTextMap(value) => <_ as SerializeValue>::serialize(value, typ, writer),
258+
Self::TextBooleanMap(value) => <_ as SerializeValue>::serialize(value, typ, writer),
259+
Self::TextTinyIntMap(value) => <_ as SerializeValue>::serialize(value, typ, writer),
260+
Self::TextSmallIntMap(value) => <_ as SerializeValue>::serialize(value, typ, writer),
261+
Self::TextIntMap(value) => <_ as SerializeValue>::serialize(value, typ, writer),
262+
Self::TextBigIntMap(value) => <_ as SerializeValue>::serialize(value, typ, writer),
263+
Self::TextFloatMap(value) => <_ as SerializeValue>::serialize(value, typ, writer),
264+
Self::TextDoubleMap(value) => <_ as SerializeValue>::serialize(value, typ, writer),
265+
Self::TextUuidMap(value) => <_ as SerializeValue>::serialize(value, typ, writer),
266+
Self::UuidTextMap(value) => <_ as SerializeValue>::serialize(value, typ, writer),
267+
Self::UuidBooleanMap(value) => <_ as SerializeValue>::serialize(value, typ, writer),
268+
Self::UuidTinyIntMap(value) => <_ as SerializeValue>::serialize(value, typ, writer),
269+
Self::UuidSmallIntMap(value) => <_ as SerializeValue>::serialize(value, typ, writer),
270+
Self::UuidIntMap(value) => <_ as SerializeValue>::serialize(value, typ, writer),
271+
Self::UuidBigIntMap(value) => <_ as SerializeValue>::serialize(value, typ, writer),
272+
Self::UuidFloatMap(value) => <_ as SerializeValue>::serialize(value, typ, writer),
273+
Self::UuidDoubleMap(value) => <_ as SerializeValue>::serialize(value, typ, writer),
274+
Self::UuidUuidMap(value) => <_ as SerializeValue>::serialize(value, typ, writer),
277275
}
278276
}
279277
}

sqlx-scylladb/src/connection/executor.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ use crate::{
1818
};
1919

2020
impl ScyllaDBConnection {
21-
async fn execute_single_page<'e, 'c: 'e, 'q: 'e, 'r: 'e>(
21+
async fn execute_single_page<'e, 'c: 'e, 'q: 'e>(
2222
&'c mut self,
2323
statement: Statement,
24-
arguments: &Option<ScyllaDBArguments<'r>>,
24+
arguments: &Option<ScyllaDBArguments>,
2525
persistent: bool,
2626
paging_state: PagingState,
2727
) -> Result<(QueryResult, PagingStateResponse), ScyllaDBError> {
@@ -54,10 +54,10 @@ impl ScyllaDBConnection {
5454
}
5555
}
5656

57-
pub(crate) async fn run<'e, 'c: 'e, 'q: 'e, 'r: 'e>(
57+
pub(crate) async fn run<'e, 'c: 'e, 'q: 'e>(
5858
&'c mut self,
5959
sql: &'q str,
60-
arguments: Option<ScyllaDBArguments<'r>>,
60+
arguments: Option<ScyllaDBArguments>,
6161
persistent: bool,
6262
) -> Result<
6363
impl Stream<Item = Result<Either<ScyllaDBQueryResult, ScyllaDBRow>, Error>> + 'e,

0 commit comments

Comments
 (0)