go to post Dmitrii Baranov · Feb 25 Here it is (implemented as Mixin): Class MyNamespace.Pooled Extends Ens.Host [ Abstract ] { Property PoolIndex As %Integer [ Calculated ]; Method PoolIndexGet() As %Integer { #Dim cn as %String Set cn = ..%ConfigName #Dim statement as %SQL.Statement Set statement = ##class(%SQL.Statement).%New() Set status = statement.%PrepareClassQuery("Ens.Job","Enumerate") $$$ThrowOnError(status) #Dim rs as %SQL.StatementResult Set rs = statement.%Execute() #Dim i as %Integer = -1 While (rs.%Next()) { #Dim jobId as %String Set jobId = rs.%Get("Job") If (rs.%Get("ConfigName") = cn) { Set i = i + 1 If (jobId = $JOB) { Kill rs Return i } } } Kill rs Return i } Property PoolSize As %Integer [Calculated]; Method PoolSizeGet() As %Integer { #Dim cn as %String Set cn = ..%ConfigName #Dim statement as %SQL.Statement Set statement = ##class(%SQL.Statement).%New() Set status = statement.%PrepareClassQuery("Ens.Job","Enumerate") $$$ThrowOnError(status) #Dim rs as %SQL.StatementResult Set rs = statement.%Execute() #Dim i as %Integer = 0 While (rs.%Next()) { If (rs.%Get("ConfigName") = cn) { Set i = i + 1 } } Kill rs Return i } }
go to post Dmitrii Baranov · Dec 28, 2024 Found the answer. It is simply not allowed: "+ Rule: For collections of type document, message, searchset or collection, all entries must contain resources, and not have request or response elements"
go to post Dmitrii Baranov · Dec 14, 2024 The error has gone after IRIS restart. Another indicator of the problem was that the SQL Gateway connection test was not working