mssql_ecto icon indicating copy to clipboard operation
mssql_ecto copied to clipboard

support for xml column type

Open brentweber opened this issue 8 years ago • 4 comments
trafficstars

I was wondering if you have plans to support xml column type, even if it just returns it as a string. I get the following error when attempting to use this column in my schema as the :string type ** (Mssqlex.Error) Column type not supported | ODBC_CODE | SQL_SERVER_CODE 0

brentweber avatar Jul 05 '17 17:07 brentweber

Hi @brentweber I will look into whether supporting this requires a change to msql_ecto or a change to Erlang ODBC

shdblowers avatar Jul 05 '17 18:07 shdblowers

Hi @brentweber have investigated supporting XML type and will require a change to Erlang ODBC rather than mssql_ecto or mssqlex.

@toddharding is currently looking at making a change to Erlang ODBC to support datetimeoffset, I wonder if it would be possible to support xml via a similar change?

shdblowers avatar Jul 06 '17 19:07 shdblowers

Leaving this here for future reference.

Testing XML type.

test "xml", %{pid: pid} do
    assert {_query, %Result{columns: ["test"], rows: [["<message>Hello</message>"]]}} =
      act(pid, "xml", ["<message>Hello</message>"])
  end

shdblowers avatar Jul 06 '17 19:07 shdblowers

@shdblowers thanks for looking into this, and if @toddharding would be able to support XML type via a similar ODBC change that would be great but after further testing I'm not sure I will be able to use this adapter due to string type limitations. But Im sure someone will have the XML issue in the future.

brentweber avatar Jul 07 '17 11:07 brentweber