Non-owning view of a row field.
More...
#include <tdslite/detail/tdsl_field.hpp>
Non-owning view of a row field.
◆ element_type
| using tdsl::span< const tdsl::uint8_t >::element_type = const tdsl::uint8_t |
|
inherited |
◆ value_type
| using tdsl::span< const tdsl::uint8_t >::value_type = typename traits::remove_cv<const tdsl::uint8_t >::type |
|
inherited |
◆ size_type
| using tdsl::span< const tdsl::uint8_t >::size_type = tdsl::size_t |
|
inherited |
◆ ssize_type
| using tdsl::span< const tdsl::uint8_t >::ssize_type = tdsl::ssize_t |
|
inherited |
◆ pointer
| using tdsl::span< const tdsl::uint8_t >::pointer = const tdsl::uint8_t * |
|
inherited |
◆ const_pointer
| using tdsl::span< const tdsl::uint8_t >::const_pointer = const const tdsl::uint8_t * |
|
inherited |
◆ reference
| using tdsl::span< const tdsl::uint8_t >::reference = const tdsl::uint8_t & |
|
inherited |
◆ const_reference
| using tdsl::span< const tdsl::uint8_t >::const_reference = const const tdsl::uint8_t & |
|
inherited |
◆ iterator
◆ const_iterator
◆ self_type
◆ tdsl_field()
template<typename... Args>
◆ operator=()
template<typename... Args>
| auto tdsl::tdsl_field::operator= |
( |
Args &&... |
args | ) |
-> tdsl_field & |
|
inlinenoexcept |
◆ as()
template<typename T >
| auto tdsl::tdsl_field::as |
( |
| ) |
const -> T |
|
inlinenoexcept |
Interpret the field's value as type T.
For arithmetic T, returns T{} (zero) if the field is NULL or has fewer bytes than sizeof(T). Check is_null() to tell a NULL value from zero.
◆ is_null()
| bool tdsl::tdsl_field::is_null |
( |
| ) |
const |
|
inlinenoexcept |
Check if field is NULL.
Note that NULL is not equivalent to value with zero length. In SQL world, these two are separate things.
- Returns
- true Value is NULL, false otherwise
◆ column_info()
◆ operator==()
|
|
inlineconstexprnoexceptinherited |
Equality comparison operator.
Two spans are considered equal if they point to same memory
- Parameters
-
| [in] | other | Span to compare against |
- Returns
- true Spans are equal
-
false otherwise
◆ size_bytes()
|
|
inlineconstexprnoexceptinherited |
Get the amount of the bytes in the span.
- Returns
- size_type Amount of the bytes in the span
◆ size()
|
|
inlineconstexprnoexceptinherited |
Get the amount of the elements in the span.
- Returns
- size_type Amount of the element in the span
◆ ssize()
|
|
inlineconstexprnoexceptinherited |
Get the amount of the elements in the span.
- Returns
- size_type Amount of the element in the span
◆ data()
|
|
inlineconstexprnoexceptinherited |
Data pointer.
- Returns
- T* Pointer to the beginning of the span
◆ begin()
|
|
inlineconstexprnoexceptinherited |
Iterator interface begin() function.
- Returns
- T* Pointer to the beginning of the span
◆ end()
|
|
inlineconstexprnoexceptinherited |
Iterator interface end() function.
- Returns
- T* Pointer to the one past last element of the span
◆ cbegin()
|
|
inlineconstexprnoexceptinherited |
Iterator interface begin() function.
- Returns
- T* Pointer to the beginning of the span
◆ cend()
|
|
inlineconstexprnoexceptinherited |
Iterator interface end() function.
- Returns
- T* Pointer to the one past last element of the span
◆ operator[]()
Subscript operator.
- Parameters
-
| [in] | index | Element to access |
- Returns
- reference Reference to the element
◆ operator bool()
| tdsl::span< const tdsl::uint8_t >::operator bool |
( |
| ) |
const |
|
inlinenoexceptinherited |
Make span boolable, so it can be used expressions like: span<int> span_v; ... if(span_v){ ..do stuff.
}
- Returns
- true if data is not nullptr and size is greater than zero
-
false otherwise
◆ rebind_cast()
| constexpr auto tdsl::span< const tdsl::uint8_t >::rebind_cast |
( |
| ) |
const -> span<const Q> |
|
inlineconstexprnoexceptinherited |
Cast span to another span with new element type.
- Template Parameters
-
- Returns
- span<const Q> New span
- Note
- If the original span's size_bytes() is not a multiple of sizeof(Q), the element count of the resulting span will be rounded down.
◆ element_count
Size of the span (in element count)
The documentation for this struct was generated from the following file: