From 18e646679c1a1341b023c0f869d0b010ee7052c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Ko=C5=82aczkowski?= Date: Wed, 26 Jun 2024 14:38:58 +0200 Subject: [PATCH] CQL Vector type support This commit adds serializing and deserializing rune lists to/from CQL vectors. --- Cargo.lock | 3 +++ Cargo.toml | 2 +- src/context.rs | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7348958..214f1a9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1913,6 +1913,7 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "scylla" version = "0.13.0" +source = "git+https://github.com/pkolaczk/scylla-rust-driver.git?branch=vector#ea914d446d2172d3470f1e4de5fd87d55962b51a" dependencies = [ "arc-swap", "async-trait", @@ -1944,6 +1945,7 @@ dependencies = [ [[package]] name = "scylla-cql" version = "0.2.0" +source = "git+https://github.com/pkolaczk/scylla-rust-driver.git?branch=vector#ea914d446d2172d3470f1e4de5fd87d55962b51a" dependencies = [ "async-trait", "byteorder", @@ -1959,6 +1961,7 @@ dependencies = [ [[package]] name = "scylla-macros" version = "0.5.0" +source = "git+https://github.com/pkolaczk/scylla-rust-driver.git?branch=vector#ea914d446d2172d3470f1e4de5fd87d55962b51a" dependencies = [ "darling", "proc-macro2", diff --git a/Cargo.toml b/Cargo.toml index 8484c3b..3374494 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -38,7 +38,7 @@ rand = "0.8" regex = "1.5" rune = "0.12" rust-embed = "8" -scylla = { path = "../scylla-rust-driver/scylla", features = ["ssl"] } +scylla = { git = "https://github.com/pkolaczk/scylla-rust-driver.git", branch = "vector", features = ["ssl"] } search_path = "0.1" serde = { version = "1.0.116", features = ["derive"] } serde_json = "1.0.57" diff --git a/src/context.rs b/src/context.rs index 1c56a08..0906824 100644 --- a/src/context.rs +++ b/src/context.rs @@ -616,7 +616,7 @@ mod bind { .try_collect()?; Ok(CqlValue::Set(elements)) } - (Value::Vec(v), ColumnType::Vector(elt, dim)) => { + (Value::Vec(v), ColumnType::Vector(elt, _)) => { let v = v.borrow_ref().unwrap(); let elements = v .as_ref()