ColMetadata token

A ColMetadata is sent by the server as the first packet in a result set, either from the execution of a SQL command, or of a stored procedure. The complete definition can be found in the Microsoft documentation.


Properties

byte tokenType: the type code for this token (0x81).

String tokenTypeName: the name corresponding to this token's type ("ColMetadata").

List<EncryptionKeyInfo> keyInfos: returns information on encrypted columns. This feature is not yet supported.

List<ColumnMetadata> columns: the definition of the columns in the result set.


ColumnMetadata

String columnName: the name of the column. This can be blank in the case of unnamed derived columns (e.g. "select count(*) from mytable")

int userType: the user-defined type number.

boolean fNullable: whether this type can be set to null.

boolean fCaseSen: whether this type is case-sensitive.

byte usUpdateable: whether this column is updatable, and how. Column is read-only = 0, column is read/write = 1, updateable unknown = 2. Any other value is invalid.

boolean fIdentity: whether this column is an identity column.

boolean fComputed: whether this column is computed.

boolean fFixedLenCLRType: whether this column is a fixed-length common language runtime user-defined type.

boolean fSparseColumnSet: whether this column is the special column for a sparse column set.

boolean fEncrypted: whether this column is encrypted.

boolean fHidden: whether this column is part of a hidden primary key.

boolean fKey: whether this column is part of a primary key for the row and the T-SQL SELECT statement contains FOR BROWSE.

boolean fNullableUnknown: if this is set, it is unknown whether this column is nullable or not.

TypeInfo typeInfo: the TypeInfo object for this column.

String tableName: the name of the table for this column. This is often empty, but when it's not, it can be qualified with the schema (e.g "myschema.mytable").