Skip to content

[API Proposal]: Expose Vector Dataype in SqlDbType #115148

Closed
@apoorvdeshmukh

Description

@apoorvdeshmukh

Background and motivation

The System.Data.SqlDbType enum represents the datatypes supported by SQL Server and is used with SqlParameter to specify the column type to be used in SQL server operations while execution SqlCommand.

With the vector datatype being supported in SQL Server link there is a need to support the vector type in Microsoft.Data.SqlClient ADO.Net provider for SQL Server.

The API suggestion is aimed at adding an enum called Vector with value 36 in SqlDbType.
Once this enum is available Microsoft.Data.SqlClient (the SQL Server driver) can then leverage the enum value to allow vector operations using Microsoft.Data.SqlClient APIs.

namespace System.Data
{
    // Specifies the SQL Server data type.
    public enum SqlDbType
    {
        Vector = 36,
    }
}

The version of Microsoft.Data.SqlClient targeting .Net 10, will be able to use the enum SqlDbType.Vector to provide vector datatype support.

API Proposal

namespace System.Data
{
    // Specifies the SQL Server data type.
    public enum SqlDbType
    {
        Vector = 36,
    }
}```


### API Usage

```csharp
using Microsoft.Data.SqlClient;


SqlParameter param = new SqlParameter();

param.SqlDbType = System.Data.SqlDbType.Vector;

Alternative Designs

No response

Risks

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions