klyn.databases.sql.sqlserver.SqlServerSupport.sqlTypeToKlynType
method

    public static sqlTypeToKlynType(sqlType as Int) as Int:

Description

Converts a SQL Server type code to Klyn Types constant.

Parameters

Parameter | Description
--- | ---
`sqlType` | TDS type token received in SQL Server column metadata.

Returns

Matching portable SQL type constant, or `Types.OTHER` when the token is not part of the public SQL type model.

Example

    import klyn.databases.sql
    import klyn.databases.sql.sqlserver

    assert SqlServerSupport.sqlTypeToKlynType(SqlServerSupport.SQLTYPE_INT) == Types.INTEGER