Skip to content

Commit

Permalink
add toStrings() to Tuple impls
Browse files Browse the repository at this point in the history
  • Loading branch information
gavinking committed May 27, 2023
1 parent 406b039 commit e073e4e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
package org.hibernate.jpa.spi;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -126,6 +127,11 @@ public Object[] toArray() {
return tuple;
}

@Override
public String toString() {
return Arrays.toString( tuple );
}

@Override
public List<TupleElement<?>> getElements() {
List<TupleElement<?>> elements = new ArrayList<>( size );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/
package org.hibernate.sql.results.internal;

import java.util.Arrays;
import java.util.List;
import jakarta.persistence.TupleElement;

Expand Down Expand Up @@ -112,4 +113,9 @@ public Object[] toArray() {
public List<TupleElement<?>> getElements() {
return tupleMetadata.getList();
}

@Override
public String toString() {
return Arrays.toString( row );
}
}

0 comments on commit e073e4e

Please sign in to comment.