Jim Priest
09/11/2023, 11:43 PMseancorfield
Ashudeep Sharma
09/12/2023, 4:07 AMJim Priest
09/12/2023, 1:10 PMjc
09/12/2023, 5:37 PMjc
09/12/2023, 5:37 PMjc
09/12/2023, 5:37 PMseancorfield
jc
09/12/2023, 6:19 PMEvil Ware
09/13/2023, 1:28 PMjc
09/13/2023, 3:30 PMEvil Ware
09/13/2023, 4:18 PMjc
09/13/2023, 4:19 PMEvil Ware
09/13/2023, 4:20 PMjc
09/13/2023, 4:21 PMEvil Ware
09/13/2023, 4:26 PMjc
09/13/2023, 4:27 PMjc
09/13/2023, 4:29 PMseancorfield
jc
09/13/2023, 5:00 PMAlso, with the implementation of the new mechanism, acall on agetObject(columnIndex)
column returns aDATETIME
object now instead of aLocalDateTime
. To receive aString
like before, useString
instead.getObject(columnIndex, String.class)
seancorfield
DATETIME
-- we either use DATE
or TIMESTAMP
(partly because those map directly to java.sql.Date
and java.sql.Timestamp
-- there is no direct equivalent in JDBC for DATETIME
). But, yeah, changing the fundamental type of a returned column like that is a terrible thing to do -- let alone in a PATCH release.
I'm really not sure what Adobe could or should do about this. ACF is Java code and it relies on JDBC driver behavior just like any other JVM application. And CFML is a JVM language so it too, ultimately, depends on JDBC behavior. Calling .getObject(columnIndex)
is pretty fundamental in JDBC-based apps and you get back whatever Java type the driver decides.
You could query to get the schema details and introspect the metadata to identify that column 4 should be mapped to Java type String and call .getObject()
with two arguments -- but that is not portable across databases or even across drivers and versions, so there really is an inherent limit in JDBC code in terms of what you can do at a generic level. This sort of decision requires domain knowledge and that really has to come from the application, not the "middleware".
I've maintained Clojure's two main JDBC wrappers for a decade and they have to be generic since they need to work across dozens of databases and many dozens of JDBC drivers/versions. JDBC is a nightmare for this: it's underspecified and a lot of useful behavior is not portable -- and some databases and/or drivers just don't support certain operations (throwing an exception) or return null
(even when the JDBC "spec" says you can't get null
!).jc
09/13/2023, 5:53 PMseancorfield
jc
09/13/2023, 6:08 PM.toString()
on the value. So for instance in @Jim Priest dataset, he would basically do the following ( again not recommended )
password_dt.toString()