12345678910111213141516171819202122232425262728293031323334module juptune.postgres.protocol.connection;
struct PostgresColumnDescription
{
/++ ENUMS ++/
/// What wire format the value will be in.
enum Format : byte
{
///
FAILSAFE = cast(byte)-1,
///
text = cast(byte)0,
///
binary = cast(byte)1
}
/++ VARIABLES ++/
/// If applicable, the attribute number of this column from within a table. Otherwise 0.
ushort columnAttributeNumber;
/// The data type stored by this column.
PostgresDataTypeOid dataType;
/// Some data types have additional modifiers which are expressed via this field on a per-datatype basis.
int dataTypeModifier;
/// The exact amount of bytes taken up by this data type (I believe when in its binary format). A value < 0 indicates a variable length type.
short dataTypeSize;
/// How the value of this column is transferred over the wire.
PostgresColumnDescription.Format format;
/// The name of the column. This will almost always be provided as an internal slice into PostgresProtocol 's buffer, so please perform a full copy of the memory within the slice** rather than a by-value copy of just the slice itself, if the name needs to be persisted.
const char[] nameDoNotCopy;
/// If applicable, the object ID of the table this column belongs to. Otherwise 0.
int tableObjectId;
}
Contains information about a particular column. This represents either a column in a table, or a column within a query's return result.
| Name | Description |
|---|---|
| Format |
What wire format the value will be in. |
| Name | Description |
|---|---|
| columnAttributeNumber |
If applicable, the attribute number of this column from within a table. Otherwise 0. |
| dataType |
The data type stored by this column. |
| dataTypeModifier |
Some data types have additional modifiers which are expressed via this field on a per-datatype basis. |
| dataTypeSize |
The exact amount of bytes taken up by this data type (I believe when in its binary format). A value < 0 indicates a variable length type. |
| format |
How the value of this column is transferred over the wire. |
| nameDoNotCopy |
The name of the column. This will almost always be provided as an internal slice into |
| tableObjectId |
If applicable, the object ID of the table this column belongs to. Otherwise 0. |