Skip to content

Commit

Permalink
blob handling is too slow #235
Browse files Browse the repository at this point in the history
  • Loading branch information
abstratt committed Sep 5, 2017
1 parent d5734e8 commit b94f202
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,7 @@ public Blob getBlob(TypeRef entityRef, String objectId, String blobPropertyName,
throw new KirraException("Attribute " + blobPropertyName + " does not exist", null, Kind.SCHEMA);
if (!KirraHelper.isBlob(property.getType()))
throw new KirraException("Attribute " + blobPropertyName + " is not a blob type", null, Kind.SCHEMA);
BlobInfo result = (BlobInfo) convertFromBasicType(instanceFound.getValue(property), (Classifier) property.getType(), DataProfile.Empty);
return toBlob(result);
return (Blob) convertFromBasicType(instanceFound.getValue(property), (Classifier) property.getType(), DataProfile.Empty);
}

private Blob toBlob(BlobInfo convertFromBlobType) {
Expand Down Expand Up @@ -944,6 +943,9 @@ private List<?> convertFromCollectionType(CollectionType value, Classifier sourc
}

private Object convertFromPrimitive(PrimitiveType<?> value) {
if (value instanceof BlobType) {
return toBlob(((BlobType) value).primitiveValue());
}
Object primitiveValue = value.primitiveValue();
return primitiveValue;
}
Expand Down

0 comments on commit b94f202

Please sign in to comment.