Skip to content

Commit 727dd83

Browse files
committed
CGDFG module.softtype
1 parent e045162 commit 727dd83

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/CloudGraphsDFG/services/CloudGraphsDFG.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ isFactor(dfg::CloudGraphsDFG, sym::Symbol)::Bool =
155155
function getSofttype(dfg::CloudGraphsDFG, lbl::Symbol; currentTransaction::Union{Nothing, Neo4j.Transaction}=nothing)
156156
st = _getNodeProperty(dfg.neo4jInstance, union(_getLabelsForType(dfg, DFGVariable), [String(lbl)]), "softtype", currentTransaction=currentTransaction)
157157
@debug "Trying to find softtype: $st"
158-
softType = getTypeFromSerializationModule(dfg, Symbol(st))
158+
softType = getTypeFromSerializationModule(st)
159159
return softType()
160160
end
161161

@@ -177,7 +177,7 @@ function updateVariable!(dfg::CloudGraphsDFG, variable::DFGVariable; skipAddErro
177177
# Create/update the base variable
178178
# NOTE: We are not merging the variable.tags into the labels anymore. We can index by that but not
179179
# going to pollute the graph with unnecessary (and potentially dangerous) labels.
180-
addProps = Dict("softtype" => "\"$(string(typeof(getSofttype(variable))))\"")
180+
addProps = Dict("softtype" => "\"$(DistributedFactorGraphs.typeModuleName(getSofttype(variable)))\"")
181181
query = """
182182
MATCH (session:$(join(_getLabelsForType(dfg, Session), ":")))
183183
MERGE (node:$(join(_getLabelsForInst(dfg, variable), ":")))

src/CloudGraphsDFG/services/CommonFunctions.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ function _structToNeo4jProps(inst::Union{User, Robot, Session, PVND, N, APPE, AB
146146
# Neo4j type conversion if possible - keep timestamps timestamps, etc.
147147
if field isa ZonedDateTime
148148
val = "datetime(\"$(string(field))\")"
149+
# val = "datetime(\"$(Dates.format(field, "yyyy-mm-ddTHH:MM:SS.ssszzz"))\")"
149150
end
150151
if field isa UUID
151152
val = "\"$(string(field))\""
@@ -167,7 +168,7 @@ function _structToNeo4jProps(inst::Union{User, Robot, Session, PVND, N, APPE, AB
167168
val = field.value
168169
end
169170
if fieldname == :softtype
170-
val = string(typeof(getSofttype(inst)))
171+
val = DistributedFactorGraphs.typeModuleName(getSofttype(inst))
171172
end
172173
# Factors
173174
# TODO: Consolidate with packFactor in Serialization.jl - https://github.com/JuliaRobotics/DistributedFactorGraphs.jl/issues/525

0 commit comments

Comments
 (0)