QueryColumnType doesn't handle "idstamp" (mssql)

Description

QueryColumnType::fromString throws an IllegalArgumentException on “idstamp”. It can probably be mapped to VARCHAR.

Activity

Show:

Michael Born @ Ortus October 11, 2024 at 3:55 PM

Awesome, thanks for testing !

David Rogers October 11, 2024 at 3:55 PM

Built 29b92350c405977ccb780e44726f11ea2314d4f8 and it looks to be good now.

Michael Born @ Ortus October 11, 2024 at 3:13 PM

could you possibly test this out once the snapshot is done building?

https://github.com/ortus-boxlang/BoxLang/actions/runs/11294806955

Michael Born @ Ortus October 11, 2024 at 3:13 PM

Ok, I implemented basic idstamp support, mapping it to CHAR as does Lucee:

https://github.com/ortus-boxlang/BoxLang/commit/750195237397ba249291fc194d51b37dcee1e26d

as well as rudimentary support for all known cf_sql_* types in the CFDocs SqlTypes cheatsheet:

https://github.com/ortus-boxlang/BoxLang/commit/c73897da313c8e9ae2ebb53d4ef0b849c5331e56

I also added a simple test for each of the above sql types. We can expand on this as we go/grow.

Michael Born @ Ortus October 11, 2024 at 2:32 PM
Edited

Interesting, Lucee actually maps this to CHAR:
https://github.com/lucee/Lucee/blob/b0067638dba337a063b044d41793f0f719e2a2c0/core/src/main/java/lucee/runtime/db/CFTypes.java#L265

I will map this to CHAR, but I’m still kinda at a loss as to how this works. How does it map to the “uniqueidentifier” MSSQL type when that type isn’t referenced in Lucee?

did you have a test case / example code for us to look at? Is this from a queryExecute() with a provided parameter like this?

queryExecute( "my SQL...", { idstamp : { value : "foo123", type : "CF_SQL_IDSTAMP" } } );
Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Fix versions

Priority

Sentry

Created October 7, 2024 at 9:48 PM
Updated October 11, 2024 at 3:55 PM
Resolved October 11, 2024 at 3:21 PM