ColdFusion查询java.sql.ResultSet

时间:2020-12-21 11:53:26

I've looked in the "undocumentation", and I can see how to create a coldfusion.sql.QueryTable from a ResultSet, but not the other way around. So, how can I extract the java.sql.ResultSet from a ColdFusion ( coldfusion.sql.QueryTable ) query object?

我查看了“文档”,我可以看到如何从ResultSet创建coldfusion.sql.QueryTable,但不是相反。那么,如何从ColdFusion(coldfusion.sql.QueryTable)查询对象中提取java.sql.ResultSet呢?

2 个解决方案

#1


8  

coldfusion.sql.QueryTable implements javax.sql.RowSet, which extends java.sql.ResultSet

coldfusion.sql.QueryTable实现了javax.sql.RowSet,它扩展了java.sql.ResultSet

Thus, as you discovered, you don't need to do anything. A ColdFusion query is already a Java ResultSet.

因此,正如您所发现的,您不需要做任何事情。 ColdFusion查询已经是Java ResultSet。

#2


2  

Turns out all I had to do was pass in my coldfusion.sql.QueryTable object...don't know why it works, unless ColdFusion is doing some sort of magic casting under the hood.

事实证明我所要做的就是传递我的coldfusion.sql.QueryTable对象...不知道它为什么会起作用,除非ColdFusion在引擎盖下进行某种魔法铸造。

#1


8  

coldfusion.sql.QueryTable implements javax.sql.RowSet, which extends java.sql.ResultSet

coldfusion.sql.QueryTable实现了javax.sql.RowSet,它扩展了java.sql.ResultSet

Thus, as you discovered, you don't need to do anything. A ColdFusion query is already a Java ResultSet.

因此,正如您所发现的,您不需要做任何事情。 ColdFusion查询已经是Java ResultSet。

#2


2  

Turns out all I had to do was pass in my coldfusion.sql.QueryTable object...don't know why it works, unless ColdFusion is doing some sort of magic casting under the hood.

事实证明我所要做的就是传递我的coldfusion.sql.QueryTable对象...不知道它为什么会起作用,除非ColdFusion在引擎盖下进行某种魔法铸造。