Skip to content

Commit e39f449

Browse files
authored
Merge pull request #1198 from Lorak-mmk/scylla_cql_cleanup
scylla_cql cleanup after legacy APIs removal
2 parents 8d0c6d7 + 3db46f6 commit e39f449

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+5224
-5306
lines changed

docs/source/data-types/counter.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# use std::error::Error;
1010
# async fn check_only_compiles(session: &Session) -> Result<(), Box<dyn Error>> {
1111
use futures::TryStreamExt;
12-
use scylla::frame::value::Counter;
12+
use scylla::value::Counter;
1313

1414
// Add to counter value
1515
let to_add: Counter = Counter(100);

docs/source/data-types/date.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Internally [date](https://docs.scylladb.com/stable/cql/types.html#dates) is repr
77

88
## CqlDate
99

10-
Without any extra features enabled, only `frame::value::CqlDate` is available. It's an
10+
Without any extra features enabled, only `value::CqlDate` is available. It's an
1111
[`u32`](https://doc.rust-lang.org/std/primitive.u32.html) wrapper and it matches the internal date representation.
1212

1313
However, for most use cases other types are more practical. See following sections for `chrono` and `time`.
@@ -18,7 +18,7 @@ However, for most use cases other types are more practical. See following sectio
1818
# use scylla::client::session::Session;
1919
# use std::error::Error;
2020
# async fn check_only_compiles(session: &Session) -> Result<(), Box<dyn Error>> {
21-
use scylla::frame::value::CqlDate;
21+
use scylla::value::CqlDate;
2222
use futures::TryStreamExt;
2323

2424
// 1970-01-08

docs/source/data-types/decimal.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Without any feature flags, the user can interact with `decimal` type by making u
1212
# use std::error::Error;
1313
# async fn check_only_compiles(session: &Session) -> Result<(), Box<dyn Error>> {
1414
use futures::TryStreamExt;
15-
use scylla::frame::value::CqlDecimal;
15+
use scylla::value::CqlDecimal;
1616
use std::str::FromStr;
1717

1818
// Insert a decimal (123.456) into the table

docs/source/data-types/duration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# use std::error::Error;
99
# async fn check_only_compiles(session: &Session) -> Result<(), Box<dyn Error>> {
1010
use futures::TryStreamExt;
11-
use scylla::frame::value::CqlDuration;
11+
use scylla::value::CqlDuration;
1212

1313
// Insert some duration into the table
1414
let to_insert: CqlDuration = CqlDuration { months: 1, days: 2, nanoseconds: 3 };

docs/source/data-types/time.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ midnight. It can't be negative or exceed `86399999999999` (23:59:59.999999999).
77

88
## CqlTime
99

10-
Without any extra features enabled, only `frame::value::CqlTime` is available. It's an
10+
Without any extra features enabled, only `value::CqlTime` is available. It's an
1111
[`i64`](https://doc.rust-lang.org/std/primitive.i64.html) wrapper and it matches the internal time representation.
1212

1313
However, for most use cases other types are more practical. See following sections for `chrono` and `time`.
@@ -18,7 +18,7 @@ However, for most use cases other types are more practical. See following sectio
1818
# use scylla::client::session::Session;
1919
# use std::error::Error;
2020
# async fn check_only_compiles(session: &Session) -> Result<(), Box<dyn Error>> {
21-
use scylla::frame::value::CqlTime;
21+
use scylla::value::CqlTime;
2222
use futures::TryStreamExt;
2323

2424
// 64 seconds since midnight

docs/source/data-types/timestamp.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Internally [timestamp](https://docs.scylladb.com/stable/cql/types.html#timestamp
77

88
## CqlTimestamp
99

10-
Without any extra features enabled, only `frame::value::CqlTimestamp` is available. It's an
10+
Without any extra features enabled, only `value::CqlTimestamp` is available. It's an
1111
[`i64`](https://doc.rust-lang.org/std/primitive.i64.html) wrapper and it matches the internal time representation. It's
1212
the only type that supports full range of values that database accepts.
1313

@@ -19,7 +19,7 @@ However, for most use cases other types are more practical. See following sectio
1919
# use scylla::client::session::Session;
2020
# use std::error::Error;
2121
# async fn check_only_compiles(session: &Session) -> Result<(), Box<dyn Error>> {
22-
use scylla::frame::value::CqlTimestamp;
22+
use scylla::value::CqlTimestamp;
2323
use futures::TryStreamExt;
2424

2525
// 64 seconds since unix epoch, 1970-01-01 00:01:04

docs/source/data-types/timeuuid.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Also, `value::CqlTimeuuid` is a wrapper for `uuid::Uuid` with custom ordering lo
1212
# use std::str::FromStr;
1313
# async fn check_only_compiles(session: &Session) -> Result<(), Box<dyn Error>> {
1414
use futures::TryStreamExt;
15-
use scylla::frame::value::CqlTimeuuid;
15+
use scylla::value::CqlTimeuuid;
1616

1717
// Insert some timeuuid into the table
1818
let to_insert: CqlTimeuuid = CqlTimeuuid::from_str("8e14e760-7fa8-11eb-bc66-000000000001")?;
@@ -51,7 +51,7 @@ and now you're gonna be able to use the `uuid::v1` features:
5151
# use std::error::Error;
5252
# use std::str::FromStr;
5353
use futures::TryStreamExt;
54-
use scylla::frame::value::CqlTimeuuid;
54+
use scylla::value::CqlTimeuuid;
5555
use uuid::Uuid;
5656
# async fn check_only_compiles(session: &Session) -> Result<(), Box<dyn Error>> {
5757

docs/source/migration-guides/0.11-serialization.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Before 0.11, the driver couldn't do this kind of type checking. For example, in
99
```rust,ignore
1010
# extern crate scylla;
1111
# extern crate bytes;
12-
# use scylla::frame::value::{SerializedResult, SerializeValuesError};
12+
# use scylla::value::{SerializedResult, SerializeValuesError};
1313
# use bytes::BufMut;
1414
1515
pub trait ValueList {

docs/source/queries/values.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ or a custom struct which derives from `SerializeRow`.
1212
A few examples:
1313
```rust
1414
# extern crate scylla;
15-
# use scylla::{SerializeRow, frame::response::result::CqlValue};
15+
# use scylla::SerializeRow;
1616
# use scylla::client::session::Session;
17+
# use scylla::value::CqlValue;
1718
# use std::error::Error;
1819
# use std::collections::HashMap;
1920
# async fn check_only_compiles(session: &Session) -> Result<(), Box<dyn Error>> {
@@ -118,7 +119,7 @@ Using `Unset` results in better performance:
118119
# use scylla::client::session::Session;
119120
# use std::error::Error;
120121
# async fn check_only_compiles(session: &Session) -> Result<(), Box<dyn Error>> {
121-
use scylla::frame::value::{MaybeUnset, Unset};
122+
use scylla::value::{MaybeUnset, Unset};
122123

123124
// Inserting a null results in suboptimal performance
124125
let null_i32: Option<i32> = None;

examples/basic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use futures::StreamExt as _;
33
use futures::TryStreamExt as _;
44
use scylla::client::session::Session;
55
use scylla::client::session_builder::SessionBuilder;
6-
use scylla::frame::response::result::Row;
6+
use scylla::value::Row;
77
use scylla::DeserializeRow;
88
use std::env;
99

0 commit comments

Comments
 (0)