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

#include <tdslite/detail/token/tds_colmetadata_token.hpp>

Public Member Functions

 tds_colmetadata_token () noexcept=default
 Default constructor.
 
 tds_colmetadata_token (tds_colmetadata_token &&other) noexcept
 Move constructor.
 
tds_colmetadata_token & operator= (tds_colmetadata_token &&other) noexcept
 Move assignment.
 
 ~tds_colmetadata_token () noexcept
 Destructor.
 
 operator bool () const noexcept
 
bool allocate_colinfo_array (tdsl::uint16_t col_count) noexcept
 Allocate space for columns.
 
bool allocate_column_name_array (tdsl::uint16_t col_count) noexcept
 Allocate space for column name pointers.
 
bool set_column_name (tdsl::uint16_t index, byte_view name) noexcept
 Set the name of the column # index to name.
 

Public Attributes

tdsl::span< tds_column_info > columns = {}
 
tdsl::span< tdsl::u16char_view > column_names = {}
 

Constructor & Destructor Documentation

◆ tds_colmetadata_token() [1/2]

tdsl::tds_colmetadata_token::tds_colmetadata_token ( )
defaultnoexcept

Default constructor.

◆ tds_colmetadata_token() [2/2]

tdsl::tds_colmetadata_token::tds_colmetadata_token ( tds_colmetadata_token &&  other)
inlinenoexcept

Move constructor.

Parameters
[in]otherObject to move from

◆ ~tds_colmetadata_token()

tdsl::tds_colmetadata_token::~tds_colmetadata_token ( )
inlinenoexcept

Destructor.

Member Function Documentation

◆ operator=()

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

Move assignment.

Parameters
[in]otherObject to move from
Returns
tds_colmetadata_token& self

◆ operator bool()

tdsl::tds_colmetadata_token::operator bool ( ) const
inlinenoexcept

◆ allocate_colinfo_array()

bool tdsl::tds_colmetadata_token::allocate_colinfo_array ( tdsl::uint16_t  col_count)
inlinenoexcept

Allocate space for columns.

Parameters
[in]col_countColumn count
Returns
true if allocation successful, false otherwise.

◆ allocate_column_name_array()

bool tdsl::tds_colmetadata_token::allocate_column_name_array ( tdsl::uint16_t  col_count)
inlinenoexcept

Allocate space for column name pointers.

Parameters
[in]col_countColumn count
Returns
true if allocation successful, false otherwise.

◆ set_column_name()

bool tdsl::tds_colmetadata_token::set_column_name ( tdsl::uint16_t  index,
byte_view  name 
)
inlinenoexcept

Set the name of the column # index to name.

This function allocates at least name.size_bytes() bytes memory and copies name into allocated memory.

Parameters
[in]indexColumn index
[in]nameName value
Returns
true if set successful, false if memory allocation failed

Member Data Documentation

◆ columns

tdsl::span<tds_column_info> tdsl::tds_colmetadata_token::columns = {}

◆ column_names

tdsl::span<tdsl::u16char_view> tdsl::tds_colmetadata_token::column_names = {}

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