Toggle navigation
Home
java.util.Iterator to org.apache.ignite.cache.query.QueryCursor
No. of Instances - 2
No. of Commits - 2
No. of Projects - {'ignite'}
Hierarchy/Composition: -
Primitive Info: -
NameSpace: Jdk -> Internal
Mapping:
Cascading Type Change (Different)
TypeName
to
GridQueryProcessor.TypeName
IgniteOutClosureX<Iterator<Cache.Entry<K,V>>>
to
IgniteOutClosureX<QueryCursor<Cache.Entry<K,V>>>
GridCloseableIterator<IgniteBiTuple<K,V>>
to
GridQueryProcessor.TypeDescriptor
Cascading Type Change (Similar)
Iterator<Cache.Entry<K,V>>
to
QueryCursor<Cache.Entry<K,V>>
Add or Remove Method invocation
typesByName.get(new GridQueryProcessor.TypeName(space,type))
to
typesByName.get(new GridQueryProcessor.TypeName(cctx.name(),type))
idx.queryLocalSql(space,qry.getSql(),qry.getAlias(),F.asList(params),typeDesc,idx.backupFilter(requestTopVer.get(),null))
to
typesByName.get(new GridQueryProcessor.TypeName(cctx.name(),type))
sendQueryExecutedEvent(sqlQry,params)
to
sendQueryExecutedEvent(qry.getSql(),qry.getArgs())
Update Anonymous class
{ @Override public Iterator<Cache.Entry<K,V>> applyx() throws IgniteCheckedException { String space=cctx.name(); String type=qry.getType(); String sqlQry=qry.getSql(); Object[] params=qry.getArgs(); TypeDescriptor typeDesc=typesByName.get(new TypeName(space,type)); if (typeDesc == null || !typeDesc.registered()) throw new CacheException("Failed to find SQL table for type: " + type); final GridCloseableIterator<IgniteBiTuple<K,V>> i=idx.queryLocalSql(space,qry.getSql(),qry.getAlias(),F.asList(params),typeDesc,idx.backupFilter(requestTopVer.get(),null)); sendQueryExecutedEvent(sqlQry,params); return new ClIter<Cache.Entry<K,V>>(){ @Override public void close() throws Exception { i.close(); } @Override public boolean hasNext(){ return i.hasNext(); } @Override public Cache.Entry<K,V> next(){ IgniteBiTuple<K,V> t=i.next(); return new CacheEntryImpl<>((K)cctx.unwrapBinaryIfNeeded(t.getKey(),keepBinary,false),(V)cctx.unwrapBinaryIfNeeded(t.getValue(),keepBinary,false)); } @Override public void remove(){ throw new UnsupportedOperationException(); } } ; } }
to
{ @Override public QueryCursor<Cache.Entry<K,V>> applyx() throws IgniteCheckedException { String type=qry.getType(); GridQueryProcessor.TypeDescriptor typeDesc=typesByName.get(new GridQueryProcessor.TypeName(cctx.name(),type)); if (typeDesc == null || !typeDesc.registered()) throw new CacheException("Failed to find SQL table for type: " + type); qry.setType(typeDesc.name()); sendQueryExecutedEvent(qry.getSql(),qry.getArgs()); return idx.queryLocalSql(cctx,qry,idx.backupFilter(requestTopVer.get(),null),keepBinary); } }