Skip to content

Commit 4b8ca0d

Browse files
authored
Merge pull request #966 from JuliaRobotics/23Q1/enh/showentry
Base.show for BlobEntry,
2 parents f2b0e0d + b514bf2 commit 4b8ca0d

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

src/DataBlobs/services/BlobEntry.jl

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,25 @@ function assertHash(
2727
end
2828

2929

30+
function Base.show(io::IO, entry::BlobEntry)
31+
println(io, "_type=BlobEntry {")
32+
println(io, " id: ", entry.id)
33+
println(io, " blobId: ", entry.blobId)
34+
println(io, " originId: ", entry.originId)
35+
println(io, " label: ", entry.label)
36+
println(io, " blobstore: ", entry.blobstore)
37+
println(io, " hash: ", entry.hash)
38+
println(io, " origin: ", entry.origin)
39+
println(io, " description: ", entry.description)
40+
println(io, " mimeType: ", entry.mimeType)
41+
println(io, " timestamp ", entry.timestamp)
42+
println(io, " _version: ", entry._version)
43+
println(io, "}")
44+
end
45+
46+
Base.show(io::IO, ::MIME"text/plain", entry::BlobEntry) = show(io, entry)
47+
48+
3049
##==============================================================================
3150
## DFG BlobBlob CRUD
3251
##==============================================================================

test/consol_DataEntryBlobTests.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ _,_ = getBlob(dfg, :x1, "random")
9595
_,_ = getBlob(dfg, :x1, r"rando")
9696
gde,gdb = getBlob(dfg, :x1, :random)
9797

98+
@show gde
99+
98100
@test incrDataLabelSuffix(dfg,:x1,:random) == :random_1
99101
@test incrDataLabelSuffix(dfg,:x1,:another_1) == :another_2
100102
# @test incrDataLabelSuffix(dfg,:x1,:another) == :another_2 # TODO exand support for Regex likely search on labels

0 commit comments

Comments
 (0)