Skip to content

Commit 57d9a2f

Browse files
committed
fix rebase
1 parent cbad25f commit 57d9a2f

File tree

1 file changed

+2
-72
lines changed

1 file changed

+2
-72
lines changed

scylla/src/response/query_result.rs

Lines changed: 2 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -7,79 +7,9 @@ use scylla_cql::deserialize::result::TypedRowIterator;
77
use scylla_cql::deserialize::row::DeserializeRow;
88
use scylla_cql::deserialize::{DeserializationError, TypeCheckError};
99
use scylla_cql::frame::frame_errors::ResultMetadataAndRowsCountParseError;
10-
use scylla_cql::frame::response::result::{
11-
ColumnSpec, ColumnType, DeserializedMetadataAndRawRows, RawMetadataAndRawRows, TableSpec,
12-
};
13-
14-
#[allow(deprecated)]
10+
use scylla_cql::frame::response::result::{ColumnSpec, DeserializedMetadataAndRawRows, RawMetadataAndRawRows};
1511
#[cfg(feature = "result-displayer")]
16-
use super::rows_displayer::RowsDisplayer;
17-
18-
/// A view over specification of a table in the database.
19-
#[derive(Debug, Clone, Copy)]
20-
#[cfg_attr(test, derive(PartialEq, Eq))]
21-
pub struct TableSpecView<'res> {
22-
table_name: &'res str,
23-
ks_name: &'res str,
24-
}
25-
26-
impl<'res> TableSpecView<'res> {
27-
pub(crate) fn new_from_table_spec(spec: &'res TableSpec) -> Self {
28-
Self {
29-
table_name: spec.table_name(),
30-
ks_name: spec.ks_name(),
31-
}
32-
}
33-
34-
/// The name of the table.
35-
#[inline]
36-
pub fn table_name(&self) -> &'res str {
37-
self.table_name
38-
}
39-
40-
/// The name of the keyspace the table resides in.
41-
#[inline]
42-
pub fn ks_name(&self) -> &'res str {
43-
self.ks_name
44-
}
45-
}
46-
47-
/// A view over specification of a column returned by the database.
48-
#[derive(Debug, Clone, Copy)]
49-
#[cfg_attr(test, derive(PartialEq, Eq))]
50-
pub struct ColumnSpecView<'res> {
51-
table_spec: TableSpecView<'res>,
52-
name: &'res str,
53-
typ: &'res ColumnType<'res>,
54-
}
55-
56-
impl<'res> ColumnSpecView<'res> {
57-
pub(crate) fn new_from_column_spec(spec: &'res ColumnSpec) -> Self {
58-
Self {
59-
table_spec: TableSpecView::new_from_table_spec(spec.table_spec()),
60-
name: spec.name(),
61-
typ: spec.typ(),
62-
}
63-
}
64-
65-
/// Returns a view over specification of the table the column is part of.
66-
#[inline]
67-
pub fn table_spec(&self) -> TableSpecView<'res> {
68-
self.table_spec
69-
}
70-
71-
/// The column's name.
72-
#[inline]
73-
pub fn name(&self) -> &'res str {
74-
self.name
75-
}
76-
77-
/// The column's CQL type.
78-
#[inline]
79-
pub fn typ(&self) -> &'res ColumnType {
80-
self.typ
81-
}
82-
}
12+
use crate::response::rows_displayer::RowsDisplayer;
8313

8414
/// A view over specification of columns returned by the database.
8515
#[derive(Debug, Clone, Copy)]

0 commit comments

Comments
 (0)