Lightweight 0.20250904.0
|
#include <SqlDynamicString.hpp>
Public Types | |
using | value_type = T |
using | string_type = std::basic_string< T > |
Public Member Functions | |
template<std::size_t SourceSize> | |
constexpr LIGHTWEIGHT_FORCE_INLINE | SqlDynamicString (T const (&text)[SourceSize]) |
Constructs a fixed-size string from a string literal. | |
LIGHTWEIGHT_FORCE_INLINE constexpr | SqlDynamicString (T const *s, T const *e) noexcept |
Constructs a fixed-size string from a string pointer and end pointer. | |
LIGHTWEIGHT_FORCE_INLINE constexpr | SqlDynamicString (SqlDynamicString const &) noexcept=default |
LIGHTWEIGHT_FORCE_INLINE constexpr SqlDynamicString & | operator= (SqlDynamicString const &) noexcept=default |
LIGHTWEIGHT_FORCE_INLINE constexpr | SqlDynamicString (SqlDynamicString &&) noexcept=default |
LIGHTWEIGHT_FORCE_INLINE constexpr SqlDynamicString & | operator= (SqlDynamicString &&) noexcept=default |
LIGHTWEIGHT_FORCE_INLINE constexpr | SqlDynamicString (std::basic_string_view< T > s) noexcept |
Constructs a fixed-size string from a string view. | |
LIGHTWEIGHT_FORCE_INLINE constexpr | SqlDynamicString (std::basic_string< T > const &s) noexcept |
Constructs a fixed-size string from a string. | |
LIGHTWEIGHT_FORCE_INLINE constexpr std::basic_string_view< T > | str () const noexcept |
Returns a string view of the string. | |
LIGHTWEIGHT_FORCE_INLINE string_type const & | value () const noexcept |
Retrieves the string's inner value (std::basic_string<T>). | |
LIGHTWEIGHT_FORCE_INLINE string_type & | value () noexcept |
Retrieves the string's inner value (std::basic_string<T>). | |
LIGHTWEIGHT_FORCE_INLINE T const * | data () const noexcept |
Retrieves the string's inner value (as T const*). | |
LIGHTWEIGHT_FORCE_INLINE T * | data () noexcept |
Retrieves the string's inner value (as T*). | |
LIGHTWEIGHT_FORCE_INLINE T const * | c_str () const noexcept |
Retrieves the string's inner value (as T const*). | |
LIGHTWEIGHT_FORCE_INLINE std::size_t | capacity () const noexcept |
Retrieves the string's capacity. | |
LIGHTWEIGHT_FORCE_INLINE std::size_t | size () const noexcept |
Retrieves the string's size. | |
LIGHTWEIGHT_FORCE_INLINE constexpr bool | empty () const noexcept |
Tests if the string is empty. | |
LIGHTWEIGHT_FORCE_INLINE constexpr void | clear () noexcept |
Clears the string. | |
LIGHTWEIGHT_FORCE_INLINE constexpr void | resize (std::size_t n) noexcept |
Resizes the string. | |
LIGHTWEIGHT_FORCE_INLINE constexpr std::basic_string_view< T > | ToStringView () const noexcept |
Retrieves a string view of the string. | |
LIGHTWEIGHT_FORCE_INLINE constexpr T & | operator[] (std::size_t index) noexcept |
LIGHTWEIGHT_FORCE_INLINE constexpr T const & | operator[] (std::size_t index) const noexcept |
template<std::size_t OtherSize> | |
LIGHTWEIGHT_FORCE_INLINE std::weak_ordering | operator<=> (SqlDynamicString< OtherSize, T > const &other) const noexcept |
template<std::size_t OtherSize> | |
LIGHTWEIGHT_FORCE_INLINE constexpr bool | operator== (SqlDynamicString< OtherSize, T > const &other) const noexcept |
template<std::size_t OtherSize> | |
LIGHTWEIGHT_FORCE_INLINE constexpr bool | operator!= (SqlDynamicString< OtherSize, T > const &other) const noexcept |
LIGHTWEIGHT_FORCE_INLINE constexpr bool | operator== (std::basic_string_view< T > other) const noexcept |
LIGHTWEIGHT_FORCE_INLINE constexpr bool | operator!= (std::basic_string_view< T > other) const noexcept |
Static Public Attributes | |
static constexpr std::size_t | DynamicCapacity = N |
SQL dynamic-capacity string that mimmicks 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 25 of file SqlDynamicString.hpp.
using Lightweight::SqlDynamicString< N, T >::value_type = T |
Definition at line 29 of file SqlDynamicString.hpp.
using Lightweight::SqlDynamicString< N, T >::string_type = std::basic_string<T> |
Definition at line 30 of file SqlDynamicString.hpp.
|
inlineconstexpr |
Constructs a fixed-size string from a string literal.
Definition at line 34 of file SqlDynamicString.hpp.
|
inlineconstexprnoexcept |
Constructs a fixed-size string from a string pointer and end pointer.
Definition at line 41 of file SqlDynamicString.hpp.
|
inlineconstexprnoexcept |
Constructs a fixed-size string from a string view.
Definition at line 54 of file SqlDynamicString.hpp.
|
inlineconstexprnoexcept |
Constructs a fixed-size string from a string.
Definition at line 60 of file SqlDynamicString.hpp.
|
inlineconstexprnoexcept |
Returns a string view of the string.
Definition at line 66 of file SqlDynamicString.hpp.
References Lightweight::SqlDynamicString< N, T >::data(), and Lightweight::SqlDynamicString< N, T >::size().
|
inlinenoexcept |
Retrieves the string's inner value (std::basic_string<T>).
Definition at line 72 of file SqlDynamicString.hpp.
|
inlinenoexcept |
Retrieves the string's inner value (std::basic_string<T>).
Definition at line 78 of file SqlDynamicString.hpp.
|
inlinenoexcept |
Retrieves the string's inner value (as T const*).
Definition at line 84 of file SqlDynamicString.hpp.
Referenced by Lightweight::SqlDynamicString< N, T >::str().
|
inlinenoexcept |
Retrieves the string's inner value (as T*).
Definition at line 90 of file SqlDynamicString.hpp.
|
inlinenoexcept |
Retrieves the string's inner value (as T const*).
Definition at line 96 of file SqlDynamicString.hpp.
|
inlinenoexcept |
Retrieves the string's capacity.
Definition at line 102 of file SqlDynamicString.hpp.
|
inlinenoexcept |
Retrieves the string's size.
Definition at line 108 of file SqlDynamicString.hpp.
Referenced by Lightweight::SqlDynamicString< N, T >::str().
|
inlineconstexprnoexcept |
Tests if the string is empty.
Definition at line 114 of file SqlDynamicString.hpp.
|
inlineconstexprnoexcept |
Clears the string.
Definition at line 120 of file SqlDynamicString.hpp.
|
inlineconstexprnoexcept |
Resizes the string.
Definition at line 126 of file SqlDynamicString.hpp.
|
inlineconstexprnoexcept |
Retrieves a string view of the string.
Definition at line 132 of file SqlDynamicString.hpp.
|
inlineconstexprnoexcept |
Definition at line 137 of file SqlDynamicString.hpp.
|
inlineconstexprnoexcept |
Definition at line 142 of file SqlDynamicString.hpp.
|
inlinenoexcept |
Definition at line 153 of file SqlDynamicString.hpp.
|
inlineconstexprnoexcept |
Definition at line 159 of file SqlDynamicString.hpp.
|
inlineconstexprnoexcept |
Definition at line 165 of file SqlDynamicString.hpp.
|
inlineconstexprnoexcept |
Definition at line 170 of file SqlDynamicString.hpp.
|
inlineconstexprnoexcept |
Definition at line 175 of file SqlDynamicString.hpp.
|
staticconstexpr |
Definition at line 28 of file SqlDynamicString.hpp.