Table of Contents

Class CommandGetXdbcTypeInfo

Namespace
Arrow.Flight.Protocol.Sql
Assembly
Apache.Arrow.Flight.Sql.dll

Represents a request to retrieve information about data type supported on a Flight SQL enabled backend. Used in the command member of FlightDescriptor for the following RPC calls:

  • GetSchema: return the schema of the query.
  • GetFlightInfo: execute the catalog metadata request.

The returned schema will be: < type_name: utf8 not null (The name of the data type, for example: VARCHAR, INTEGER, etc), data_type: int32 not null (The SQL data type), column_size: int32 (The maximum size supported by that column. In case of exact numeric types, this represents the maximum precision. In case of string types, this represents the character length. In case of datetime data types, this represents the length in characters of the string representation. NULL is returned for data types where column size is not applicable.), literal_prefix: utf8 (Character or characters used to prefix a literal, NULL is returned for data types where a literal prefix is not applicable.), literal_suffix: utf8 (Character or characters used to terminate a literal, NULL is returned for data types where a literal suffix is not applicable.), create_params: list<utf8 not null> (A list of keywords corresponding to which parameters can be used when creating a column for that specific type. NULL is returned if there are no parameters for the data type definition.), nullable: int32 not null (Shows if the data type accepts a NULL value. The possible values can be seen in the Nullable enum.), case_sensitive: bool not null (Shows if a character data type is case-sensitive in collations and comparisons), searchable: int32 not null (Shows how the data type is used in a WHERE clause. The possible values can be seen in the Searchable enum.), unsigned_attribute: bool (Shows if the data type is unsigned. NULL is returned if the attribute is not applicable to the data type or the data type is not numeric.), fixed_prec_scale: bool not null (Shows if the data type has predefined fixed precision and scale.), auto_increment: bool (Shows if the data type is auto incremental. NULL is returned if the attribute is not applicable to the data type or the data type is not numeric.), local_type_name: utf8 (Localized version of the data source-dependent name of the data type. NULL is returned if a localized name is not supported by the data source), minimum_scale: int32 (The minimum scale of the data type on the data source. If a data type has a fixed scale, the MINIMUM_SCALE and MAXIMUM_SCALE columns both contain this value. NULL is returned if scale is not applicable.), maximum_scale: int32 (The maximum scale of the data type on the data source. NULL is returned if scale is not applicable.), sql_data_type: int32 not null (The value of the SQL DATA TYPE which has the same values as data_type value. Except for interval and datetime, which uses generic values. More info about those types can be obtained through datetime_subcode. The possible values can be seen in the XdbcDataType enum.), datetime_subcode: int32 (Only used when the SQL DATA TYPE is interval or datetime. It contains its sub types. For type different from interval and datetime, this value is NULL. The possible values can be seen in the XdbcDatetimeSubcode enum.), num_prec_radix: int32 (If the data type is an approximate numeric type, this column contains the value 2 to indicate that COLUMN_SIZE specifies a number of bits. For exact numeric types, this column contains the value 10 to indicate that column size specifies a number of decimal digits. Otherwise, this column is NULL.), interval_precision: int32 (If the data type is an interval data type, then this column contains the value of the interval leading precision. Otherwise, this column is NULL. This fields is only relevant to be used by ODBC).

The returned data should be ordered by data_type and then by type_name.

public sealed class CommandGetXdbcTypeInfo : IMessage<CommandGetXdbcTypeInfo>, IEquatable<CommandGetXdbcTypeInfo>, IDeepCloneable<CommandGetXdbcTypeInfo>, IBufferMessage, IMessage
Inheritance
CommandGetXdbcTypeInfo
Implements
IDeepCloneable<CommandGetXdbcTypeInfo>
IBufferMessage
IMessage
Inherited Members
Extension Methods

Constructors

CommandGetXdbcTypeInfo()

public CommandGetXdbcTypeInfo()

CommandGetXdbcTypeInfo(CommandGetXdbcTypeInfo)

public CommandGetXdbcTypeInfo(CommandGetXdbcTypeInfo other)

Parameters

other CommandGetXdbcTypeInfo

Fields

DataTypeFieldNumber

Field number for the "data_type" field.

public const int DataTypeFieldNumber = 1

Field Value

int

Properties

DataType

Specifies the data type to search for the info.

public int DataType { get; set; }

Property Value

int

Descriptor

public static MessageDescriptor Descriptor { get; }

Property Value

MessageDescriptor

HasDataType

Gets whether the "data_type" field is set

public bool HasDataType { get; }

Property Value

bool

Parser

public static MessageParser<CommandGetXdbcTypeInfo> Parser { get; }

Property Value

MessageParser<CommandGetXdbcTypeInfo>

Methods

CalculateSize()

Calculates the size of this message in Protocol Buffer wire format, in bytes.

public int CalculateSize()

Returns

int

The number of bytes required to write this message to a coded output stream.

ClearDataType()

Clears the value of the "data_type" field

public void ClearDataType()

Clone()

Creates a deep clone of this object.

public CommandGetXdbcTypeInfo Clone()

Returns

CommandGetXdbcTypeInfo

A deep clone of this object.

Equals(CommandGetXdbcTypeInfo)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(CommandGetXdbcTypeInfo other)

Parameters

other CommandGetXdbcTypeInfo

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object)

Determines whether the specified object is equal to the current object.

public override bool Equals(object other)

Parameters

other object

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

MergeFrom(CommandGetXdbcTypeInfo)

Merges the given message into this one.

public void MergeFrom(CommandGetXdbcTypeInfo other)

Parameters

other CommandGetXdbcTypeInfo

Remarks

See the user guide for precise merge semantics.

MergeFrom(CodedInputStream)

Merges the data from the specified coded input stream with the current message.

public void MergeFrom(CodedInputStream input)

Parameters

input CodedInputStream

Remarks

See the user guide for precise merge semantics.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

WriteTo(CodedOutputStream)

Writes the data to the given coded output stream.

public void WriteTo(CodedOutputStream output)

Parameters

output CodedOutputStream

Coded output stream to write the data to. Must not be null.