tdslite latest
C++ API reference
Loading...
Searching...
No Matches
tdsl::tdsl_row Struct Reference

A type that represents a row in a result set. More...

#include <tdslite/detail/tdsl_row.hpp>

Classes

struct  do_not_construct_fields
 

Public Types

enum class  e_tdsl_row_make_err { MEM_ALLOC = -1 }
 
using field_allocator_t = tds_allocator< tdsl_field >
 
using fields_type_t = tdsl::span< tdsl_field >
 
using make_result_t = tdsl::expected< tdsl_row, e_tdsl_row_make_err >
 

Public Member Functions

auto begin () const noexcept -> fields_type_t::iterator
 
auto end () const noexcept -> fields_type_t::iterator
 
auto cbegin () const noexcept -> fields_type_t::const_iterator
 
auto cend () const noexcept -> fields_type_t::const_iterator
 
auto operator[] (fields_type_t::size_type index) const noexcept -> fields_type_t::reference
 
auto size () const noexcept -> fields_type_t::size_type
 
 tdsl_row (tdsl_row &&other) noexcept
 
tdsl_row & operator= (tdsl_row &&other) noexcept
 
 ~tdsl_row () noexcept
 

Static Public Member Functions

static make_result_t make (tdsl::uint32_t n_col, do_not_construct_fields)
 Allocate space for n_col fields and make a row object but do not construct them.
 

Detailed Description

A type that represents a row in a result set.

Composed of N fields, where N is the field count.

Member Typedef Documentation

◆ field_allocator_t

◆ fields_type_t

◆ make_result_t

Member Enumeration Documentation

◆ e_tdsl_row_make_err

Enumerator
MEM_ALLOC 

Constructor & Destructor Documentation

◆ tdsl_row()

tdsl::tdsl_row::tdsl_row ( tdsl_row &&  other)
inlinenoexcept

◆ ~tdsl_row()

tdsl::tdsl_row::~tdsl_row ( )
inlinenoexcept

Member Function Documentation

◆ begin()

auto tdsl::tdsl_row::begin ( ) const -> fields_type_t::iterator
inlinenoexcept

◆ end()

auto tdsl::tdsl_row::end ( ) const -> fields_type_t::iterator
inlinenoexcept

◆ cbegin()

auto tdsl::tdsl_row::cbegin ( ) const -> fields_type_t::const_iterator
inlinenoexcept

◆ cend()

auto tdsl::tdsl_row::cend ( ) const -> fields_type_t::const_iterator
inlinenoexcept

◆ operator[]()

auto tdsl::tdsl_row::operator[] ( fields_type_t::size_type  index) const -> fields_type_t::reference
inlinenoexcept

◆ size()

auto tdsl::tdsl_row::size ( ) const -> fields_type_t::size_type
inlinenoexcept

◆ make()

static make_result_t tdsl::tdsl_row::make ( tdsl::uint32_t  n_col,
do_not_construct_fields   
)
inlinestatic

Allocate space for n_col fields and make a row object but do not construct them.

Parameters
n_colnumber of columns
Returns
tdsl_row with n_col field on success
e_tdsl_row_make_err::FAILURE_MEM_ALLOC on failure

◆ operator=()

tdsl_row & tdsl::tdsl_row::operator= ( tdsl_row &&  other)
inlinenoexcept

The documentation for this struct was generated from the following file: