28#include "fb-cpp-export.h"
30#include "Descriptor.h"
56 return id.gds_quad_high == 0 &&
id.gds_quad_low == 0;
128 std::size_t getSliceLength()
const;
131 unsigned read(std::span<std::byte> buffer);
134 void write(std::span<const std::byte> buffer);
137 template <
typename T, std::
size_t Extent>
138 requires(!std::is_same_v<std::remove_cv_t<T>, std::byte>)
139 unsigned read(std::span<T, Extent> buffer)
141 static_assert(std::is_trivially_copyable_v<T>);
142 return read(std::as_writable_bytes(buffer));
146 template <
typename T, std::
size_t Extent>
147 requires(!std::is_same_v<std::remove_cv_t<T>, std::byte>)
148 void write(std::span<const T, Extent> buffer)
150 static_assert(std::is_trivially_copyable_v<T>);
151 write(std::as_bytes(buffer));
155 void validateBuffer(std::size_t size)
const;
156 ISC_ARRAY_DESC buildIscDescriptor()
const;
Represents a Firebird array identifier.
bool isEmpty() const noexcept
Returns whether this array identifier is empty.
Provides slice access to a Firebird array.
const ArrayDescriptor & getDescriptor() const noexcept
Returns the descriptor used for slice operations.
unsigned read(std::span< T, Extent > buffer)
Reads the complete array slice into elements matching the Firebird element representation.
const ArrayId & getId() const noexcept
Returns the current array identifier.
void write(std::span< const T, Extent > buffer)
Writes the complete array slice from elements matching the Firebird element representation.
Represents a connection to a Firebird database.
Represents a transaction in one or more Firebird databases.
DescriptorOriginalType
Descriptor original type.
Defines one dimension of a Firebird array.
short upper
Inclusive upper bound.
short lower
Inclusive lower bound.
Defines the element representation and bounds of a Firebird array.
std::string field
Array field name; required when creating a new array.
int scale
Decimal scale of each array element.
DescriptorOriginalType elementType
SQL type of each array element.
unsigned elementLength
Size in bytes of each array element in Firebird's wire representation.
std::vector< ArrayBound > bounds
Inclusive bounds for each dimension, from outermost to innermost.
std::string relation
Relation containing this array field; required when creating a new array.