|
Lightweight 0.20261105.1
|
A per-driver handle struct: plain data the tagged handles store verbatim. More...
#include <Concept.hpp>
A per-driver handle struct: plain data the tagged handles store verbatim.
A driver handle struct is a handle: it is trivially copyable, copies alias one native resource, and every piece of mutable driver state lives behind the native handle, never in the struct. That is what makes the copies the library takes correct — deferred binder callbacks capture the struct by value (a reference would dangle once the owning SqlStatement is moved), and a cursor keeps its own copy — while the owning SqlStatement / SqlConnection, which frees the native resource, is never copied. A driver that cached state in the struct would see each copy diverge.
It is trivially copyable, so storing and moving it costs no more than its bytes, and equality comparable, so a handle can tell whether it holds anything: a value-initialized struct holds nothing.
Definition at line 192 of file Concept.hpp.