|
63 | 63 | //! # Ok(()) |
64 | 64 | //! # } |
65 | 65 | //! ``` |
66 | | -//! But the driver will accept anything implementing the trait [SerializeRow] |
67 | | -//! (crate::serialize::row::SerializeRow) |
| 66 | +//! But the driver will accept anything implementing the trait [SerializeRow]. |
68 | 67 | //! |
69 | 68 | //! ### Receiving results |
70 | 69 | //! The easiest way to read rows returned by a query is to cast each row to a tuple of values: |
@@ -131,8 +130,75 @@ pub mod frame { |
131 | 130 | } |
132 | 131 |
|
133 | 132 | /// Serializing bound values of a query to be sent to the DB. |
| 133 | +// Note: When editing comment on submodules here edit corresponding comments |
| 134 | +// on scylla-cql modules too. |
134 | 135 | pub mod serialize { |
135 | | - pub use scylla_cql::types::serialize::*; |
| 136 | + pub use scylla_cql::types::serialize::SerializationError; |
| 137 | + /// Contains the [BatchValues][batch::BatchValues] and [BatchValuesIterator][batch::BatchValuesIterator] trait and their |
| 138 | + /// implementations. |
| 139 | + pub mod batch { |
| 140 | + // Main types |
| 141 | + pub use scylla_cql::types::serialize::batch::{ |
| 142 | + BatchValues, BatchValuesFromIterator, BatchValuesIterator, |
| 143 | + BatchValuesIteratorFromIterator, TupleValuesIter, |
| 144 | + }; |
| 145 | + |
| 146 | + // Legacy migration types - to be removed when removing legacy framework |
| 147 | + pub use scylla_cql::types::serialize::batch::{ |
| 148 | + LegacyBatchValuesAdapter, LegacyBatchValuesIteratorAdapter, |
| 149 | + }; |
| 150 | + } |
| 151 | + |
| 152 | + /// Contains the [SerializeRow][row::SerializeRow] trait and its implementations. |
| 153 | + pub mod row { |
| 154 | + // Main types |
| 155 | + pub use scylla_cql::types::serialize::row::{RowSerializationContext, SerializeRow}; |
| 156 | + |
| 157 | + // Errors |
| 158 | + pub use scylla_cql::types::serialize::row::{ |
| 159 | + BuiltinSerializationError, BuiltinSerializationErrorKind, BuiltinTypeCheckError, |
| 160 | + BuiltinTypeCheckErrorKind, |
| 161 | + }; |
| 162 | + |
| 163 | + // Legacy migration types - to be removed when removing legacy framework |
| 164 | + pub use scylla_cql::types::serialize::row::{ |
| 165 | + // Legacy migration types - to be removed when removing legacy framework |
| 166 | + serialize_legacy_row, |
| 167 | + ValueListAdapter, |
| 168 | + ValueListToSerializeRowAdapterError, |
| 169 | + }; |
| 170 | + |
| 171 | + // Not part of the old framework, but something that we should |
| 172 | + // still aim to remove from public API. |
| 173 | + pub use scylla_cql::types::serialize::row::{SerializedValues, SerializedValuesIterator}; |
| 174 | + } |
| 175 | + |
| 176 | + /// Contains the [SerializeValue][value::SerializeValue] trait and its implementations. |
| 177 | + pub mod value { |
| 178 | + // Main types |
| 179 | + pub use scylla_cql::types::serialize::value::SerializeValue; |
| 180 | + |
| 181 | + // Errors |
| 182 | + pub use scylla_cql::types::serialize::value::{ |
| 183 | + BuiltinSerializationError, BuiltinSerializationErrorKind, BuiltinTypeCheckError, |
| 184 | + BuiltinTypeCheckErrorKind, MapSerializationErrorKind, MapTypeCheckErrorKind, |
| 185 | + SetOrListSerializationErrorKind, SetOrListTypeCheckErrorKind, |
| 186 | + TupleSerializationErrorKind, TupleTypeCheckErrorKind, UdtSerializationErrorKind, |
| 187 | + UdtTypeCheckErrorKind, |
| 188 | + }; |
| 189 | + |
| 190 | + // Legacy migration types - to be removed when removing legacy framework |
| 191 | + pub use scylla_cql::types::serialize::value::{ |
| 192 | + serialize_legacy_value, ValueAdapter, ValueToSerializeValueAdapterError, |
| 193 | + }; |
| 194 | + } |
| 195 | + |
| 196 | + /// Contains types and traits used for safe serialization of values for a CQL statement. |
| 197 | + pub mod writers { |
| 198 | + pub use scylla_cql::types::serialize::writers::{ |
| 199 | + CellOverflowError, CellValueBuilder, CellWriter, RowWriter, WrittenCellProof, |
| 200 | + }; |
| 201 | + } |
136 | 202 | } |
137 | 203 |
|
138 | 204 | /// Deserializing DB response containing CQL query results. |
|
0 commit comments