|
Lightweight 0.20260617.0
|
#include <SqlDynamicBinary.hpp>
Public Types | |
| using | value_type = uint8_t |
| The element type of the binary data. | |
| using | ByteView = std::span< value_type const > |
Public Member Functions | |
| LIGHTWEIGHT_FORCE_INLINE constexpr | SqlDynamicBinary () noexcept=default |
| Default constructor, creates an empty object. | |
| LIGHTWEIGHT_FORCE_INLINE constexpr | SqlDynamicBinary (SqlDynamicBinary const &) noexcept=default |
| Defaulted copy constructor. | |
| LIGHTWEIGHT_FORCE_INLINE constexpr SqlDynamicBinary & | operator= (SqlDynamicBinary const &) noexcept=default |
| Defaulted copy assignment operator. | |
| LIGHTWEIGHT_FORCE_INLINE constexpr | SqlDynamicBinary (SqlDynamicBinary &&) noexcept=default |
| Defaulted move constructor. | |
| LIGHTWEIGHT_FORCE_INLINE constexpr SqlDynamicBinary & | operator= (SqlDynamicBinary &&) noexcept=default |
| Defaulted move assignment operator. | |
| LIGHTWEIGHT_FORCE_INLINE constexpr | ~SqlDynamicBinary () noexcept=default |
| Defaulted destructor. | |
| template<std::size_t SourceSize> | |
| constexpr LIGHTWEIGHT_FORCE_INLINE | SqlDynamicBinary (value_type const (&text)[SourceSize]) |
| Constructs a fixed-size string from a string literal. | |
| template<std::size_t SourceSize> | |
| constexpr LIGHTWEIGHT_FORCE_INLINE | SqlDynamicBinary (std::initializer_list< value_type > data) |
| Constructs the object from an initializer list of bytes. | |
| LIGHTWEIGHT_FORCE_INLINE constexpr | SqlDynamicBinary (value_type const *s, value_type const *e) noexcept |
| Constructs a fixed-size string from a string pointer and end pointer. | |
| LIGHTWEIGHT_FORCE_INLINE constexpr | SqlDynamicBinary (ByteView s) noexcept |
| Constructs the binary payload from a contiguous view of bytes. | |
| LIGHTWEIGHT_FORCE_INLINE constexpr ByteView | Bytes () const noexcept |
| Retrieves a read-only view over the stored bytes. | |
| LIGHTWEIGHT_FORCE_INLINE constexpr ByteView | ToStringView () const noexcept |
| constexpr auto | operator<=> (SqlDynamicBinary< N > const &other) const noexcept |
| constexpr bool | operator== (SqlDynamicBinary< N > const &other) const noexcept |
| Equality operator derived from the spaceship comparison above. | |
| LIGHTWEIGHT_FORCE_INLINE constexpr std::size_t | size () const noexcept |
| Retrieves the size of the string. | |
| void LIGHTWEIGHT_FORCE_INLINE | resize (std::size_t newSize) |
| Resizes the underlying data storage to the given size. | |
| LIGHTWEIGHT_FORCE_INLINE constexpr bool | empty () const noexcept |
| Tests if the stored data is empty. | |
| LIGHTWEIGHT_FORCE_INLINE constexpr decltype(auto) | data (this auto &&self) noexcept |
| Retrieves the pointer to the string data. | |
| LIGHTWEIGHT_FORCE_INLINE void | clear () noexcept |
| Clears the storad data. | |
Static Public Attributes | |
| static constexpr auto | ColumnType = SqlColumnTypeDefinitions::VarBinary { N } |
| The SQL column type definition for this binary type. | |
| static constexpr std::size_t | DynamicCapacity = N |
| The maximum size of the underlying data storage. | |
SQL dynamic-capacity string that mimicks standard library string.
The underlying memory is allocated dynamically and the string can grow up to the maximum size of a SQL column.
Definition at line 23 of file SqlDynamicBinary.hpp.
| using Lightweight::SqlDynamicBinary< N >::value_type = uint8_t |
The element type of the binary data.
Definition at line 29 of file SqlDynamicBinary.hpp.
| using Lightweight::SqlDynamicBinary< N >::ByteView = std::span<value_type const> |
Read-only view over the stored bytes.
MSVC's STL is pinned to std::basic_string_view here: its std::span reverse iterator drags the legacy std::iter_move into overload resolution, which is then ambiguous with std::ranges::enumerate_view's own iter_move in any translation unit that uses both. Other standard libraries keep std::span because std::basic_string_view<uint8_t> is ill-formed there (no std::char_traits<unsigned char>).
Definition at line 41 of file SqlDynamicBinary.hpp.
|
inlineconstexpr |
Constructs a fixed-size string from a string literal.
Definition at line 70 of file SqlDynamicBinary.hpp.
|
inlineconstexpr |
Constructs the object from an initializer list of bytes.
Definition at line 78 of file SqlDynamicBinary.hpp.
|
inlineconstexprnoexcept |
Constructs a fixed-size string from a string pointer and end pointer.
Definition at line 85 of file SqlDynamicBinary.hpp.
|
inlineconstexprnoexcept |
Constructs the binary payload from a contiguous view of bytes.
Definition at line 91 of file SqlDynamicBinary.hpp.
|
inlineconstexprnoexcept |
Retrieves a read-only view over the stored bytes.
Definition at line 97 of file SqlDynamicBinary.hpp.
Referenced by Lightweight::SqlDynamicBinary< N >::ToStringView().
|
inlineconstexprnoexcept |
Definition at line 105 of file SqlDynamicBinary.hpp.
References Lightweight::SqlDynamicBinary< N >::Bytes().
|
inlineconstexprnoexcept |
Three-way comparison operator. Compares the byte payload only — the private _indicator member is ODBC bookkeeping and must not influence equality.
Definition at line 113 of file SqlDynamicBinary.hpp.
|
inlineconstexprnoexcept |
Equality operator derived from the spaceship comparison above.
Definition at line 119 of file SqlDynamicBinary.hpp.
|
inlineconstexprnoexcept |
Retrieves the size of the string.
Definition at line 125 of file SqlDynamicBinary.hpp.
|
inline |
Resizes the underlying data storage to the given size.
Definition at line 131 of file SqlDynamicBinary.hpp.
|
inlineconstexprnoexcept |
Tests if the stored data is empty.
Definition at line 137 of file SqlDynamicBinary.hpp.
|
inlineconstexprnoexcept |
Retrieves the pointer to the string data.
Definition at line 143 of file SqlDynamicBinary.hpp.
|
inlinenoexcept |
Clears the storad data.
Definition at line 150 of file SqlDynamicBinary.hpp.
|
staticconstexpr |
The SQL column type definition for this binary type.
Definition at line 45 of file SqlDynamicBinary.hpp.
|
staticconstexpr |
The maximum size of the underlying data storage.
Definition at line 48 of file SqlDynamicBinary.hpp.