add toStrings() to Tuple impls

This commit is contained in:
Gavin 2023-05-28 00:59:37 +02:00 committed by Christian Beikov
parent 77231ebfce
commit dc00b6c0ea
2 changed files with 12 additions and 0 deletions

View File

@ -7,6 +7,7 @@
package org.hibernate.jpa.spi; package org.hibernate.jpa.spi;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -126,6 +127,11 @@ public class NativeQueryTupleTransformer implements ResultTransformer<Tuple>, Ty
return tuple; return tuple;
} }
@Override
public String toString() {
return Arrays.toString( tuple );
}
@Override @Override
public List<TupleElement<?>> getElements() { public List<TupleElement<?>> getElements() {
List<TupleElement<?>> elements = new ArrayList<>( size ); List<TupleElement<?>> elements = new ArrayList<>( size );

View File

@ -6,6 +6,7 @@
*/ */
package org.hibernate.sql.results.internal; package org.hibernate.sql.results.internal;
import java.util.Arrays;
import java.util.List; import java.util.List;
import jakarta.persistence.TupleElement; import jakarta.persistence.TupleElement;
@ -112,4 +113,9 @@ public class TupleImpl implements JpaTuple {
public List<TupleElement<?>> getElements() { public List<TupleElement<?>> getElements() {
return tupleMetadata.getList(); return tupleMetadata.getList();
} }
@Override
public String toString() {
return Arrays.toString( row );
}
} }