@@ -14,7 +14,7 @@ getTimestamp(entry::AbstractDataEntry) = entry.timestamp
14
14
# #==============================================================================
15
15
# # BlobStoreEntry
16
16
# #==============================================================================
17
- export BlobStoreEntry
17
+ export BlobEntry
18
18
19
19
"""
20
20
$(TYPEDEF)
@@ -40,97 +40,72 @@ General Data Store Entry.
40
40
end
41
41
42
42
# should be deprecated by v0.21
43
+ export BlobStoreEntry
43
44
const BlobStoreEntry = BlobEntry
44
45
45
46
_fixtimezone (cts:: NamedTuple ) = ZonedDateTime (cts. utc_datetime* " +00" )
46
47
47
- # # needed for deserialization from JSON during DFG v0.19 transition, see #867
48
- # # TODO this function can likely be removed, since julia automatically tries type conversion on constructors.
49
- # function BlobStoreEntry(;
50
- # id,
51
- # label,
52
- # blobstore,
53
- # hash,
54
- # origin,
55
- # description,
56
- # mimeType,
57
- # timestamp,
58
- # kwargs... # drop excessive fields
59
- # )
60
- # #
61
- # BlobStoreEntry(;
62
- # id=UUID(id),
63
- # label=Symbol(label),
64
- # blobstore=Symbol(blobstore),
65
- # hash,
66
- # origin,
67
- # description,
68
- # mimeType,
69
- # timestamp=_fixtimezone(timestamp),
70
- # )
48
+ # # TODO
49
+ # """
50
+ # $(TYPEDEF)
51
+ # Data Entry in MongoDB.
52
+ # """
53
+ # struct MongodbDataEntry <: AbstractDataEntry
54
+ # label::Symbol
55
+ # id::UUID
56
+ # oid::NTuple{12, UInt8} #mongodb object id - TODO Not needed with id::UUID unique, but perhaps usefull
57
+ # hash::String
58
+ # createdTimestamp::ZonedDateTime
59
+ # # mongodb
60
+ # # mongoConfig::MongoConfig
61
+ # #maybe other fields such as:
62
+ # #flags::Bool ready, valid, locked, permissions
63
+ # #MIMEType::String
71
64
# end
72
65
73
- # TODO
74
- """
75
- $(TYPEDEF)
76
- Data Entry in MongoDB.
77
- """
78
- struct MongodbDataEntry <: AbstractDataEntry
79
- label:: Symbol
80
- id:: UUID
81
- oid:: NTuple{12, UInt8} # mongodb object id - TODO Not needed with id::UUID unique, but perhaps usefull
82
- hash:: String
83
- createdTimestamp:: ZonedDateTime
84
- # mongodb
85
- # mongoConfig::MongoConfig
86
- # maybe other fields such as:
87
- # flags::Bool ready, valid, locked, permissions
88
- # MIMEType::String
89
- end
90
-
91
66
92
- # #==============================================================================
93
- # # FileDataEntryBlob Types
94
- # #==============================================================================
95
- export FileDataEntry
96
- """
97
- $(TYPEDEF)
98
- Data Entry in a file.
99
- """
100
- struct FileDataEntry <: AbstractDataEntry
101
- label:: Symbol
102
- id:: UUID
103
- folder:: String
104
- hash:: String # using bytes2hex or perhaps Vector{Uint8}?
105
- createdTimestamp:: ZonedDateTime
67
+ # # #==============================================================================
68
+ # # # FileDataEntryBlob Types
69
+ # # #==============================================================================
70
+ # export FileDataEntry
71
+ # """
72
+ # $(TYPEDEF)
73
+ # Data Entry in a file.
74
+ # """
75
+ # struct FileDataEntry <: AbstractDataEntry
76
+ # label::Symbol
77
+ # id::UUID
78
+ # folder::String
79
+ # hash::String #using bytes2hex or perhaps Vector{Uint8}?
80
+ # createdTimestamp::ZonedDateTime
106
81
107
- function FileDataEntry (label, id, folder, hash, timestamp)
108
- if ! isdir (folder)
109
- @info " Folder '$folder ' doesn't exist - creating."
110
- # create new folder
111
- mkpath (folder)
112
- end
113
- return new (label, id, folder, hash, timestamp)
114
- end
115
- end
82
+ # function FileDataEntry(label, id, folder, hash, timestamp)
83
+ # if !isdir(folder)
84
+ # @info "Folder '$folder' doesn't exist - creating."
85
+ # # create new folder
86
+ # mkpath(folder)
87
+ # end
88
+ # return new(label, id, folder, hash, timestamp)
89
+ # end
90
+ # end
116
91
117
92
118
- # #==============================================================================
119
- # # InMemoryDataEntry Types
120
- # #==============================================================================
121
- export InMemoryDataEntry
122
- """
123
- $(TYPEDEF)
124
- Store data temporary in memory.
125
- NOTE: Neither Entry nor Blob will be persisted.
126
- """
127
- struct InMemoryDataEntry{T} <: AbstractDataEntry
128
- label:: Symbol
129
- id:: UUID
130
- # hash::String #Is this needed?
131
- createdTimestamp:: ZonedDateTime
132
- data:: T
133
- end
93
+ # # #==============================================================================
94
+ # # # InMemoryDataEntry Types
95
+ # # #==============================================================================
96
+ # export InMemoryDataEntry
97
+ # """
98
+ # $(TYPEDEF)
99
+ # Store data temporary in memory.
100
+ # NOTE: Neither Entry nor Blob will be persisted.
101
+ # """
102
+ # struct InMemoryDataEntry{T} <: AbstractDataEntry
103
+ # label::Symbol
104
+ # id::UUID
105
+ # #hash::String #Is this needed?
106
+ # createdTimestamp::ZonedDateTime
107
+ # data::T
108
+ # end
134
109
135
110
# getHash(::InMemoryDataEntry) = UInt8[]
136
111
assertHash (de:: InMemoryDataEntry , db; hashfunction = sha256) = true
0 commit comments