我正在修复EclipseLink的InformixPlatform
数据库支持类以使用我们的Informix 11.70安装。
需要工作的合同之一由以下代码表示。文档说明了所需内容:
/**
* INTERNAL:
* Indicates whether the platform supports local temporary tables.
* "Local" means that several threads may create
* temporary tables with the same name.
[snip]
*/
public boolean supportsLocalTempTables() {
return true; // is this correct?
}
/**
* INTERNAL:
* Indicates whether the platform supports global temporary tables.
* "Global" means that an attempt to create temporary table with the same
* name for the second time results in exception.
[snip]
* Note that this method is ignored in case supportsLocalTempTables() returns true.
*/
public boolean supportsGlobalTempTables() {
return false; // is this correct?
}
我的感觉是我应该从true
的实现中返回supportsLocalTempTables()
,因为我认为Informix确实支持创建一个名为FRED
的临时表的能力。来自会话1,来自会话2的临时表也名为FRED
。我的假设是否正确?
我咨询了the Informix 11.70 InfoCenter topic,但没有看到任何具体内容。
答案 0 :(得分:3)
是。 Informix中的临时表是会话的本地表,仅由会话可见。 此外,当会话关闭时,将删除其所有临时表。 因此,在不同的会话中,您可以创建具有相同名称的临时表。 无法在会话之间共享对临时表的访问。