Skip to content

Commit

Permalink
Merge pull request #15 from mnbjhu/bug_fix
Browse files Browse the repository at this point in the history
Null support for set
  • Loading branch information
mnbjhu committed Jan 29, 2023
2 parents 06dec64 + ea5c2b4 commit c96a209
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/kotlin/uk/gibby/neo4k/clauses/Set.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ package uk.gibby.neo4k.clauses


import uk.gibby.neo4k.core.QueryScope
import uk.gibby.neo4k.returns.NotNull
import uk.gibby.neo4k.returns.ReturnValue
import uk.gibby.neo4k.returns.empty.EmptyReturnInstance
import uk.gibby.neo4k.returns.generic.Nullable

/**
* Delete
Expand Down Expand Up @@ -45,5 +47,6 @@ class Set(private val map: SetMap): Clause() {
class SetMap(internal val params: MutableMap<ReturnValue<*>, ReturnValue<*>> = mutableMapOf()){
infix fun <T, U: ReturnValue<T>>U.to(value: T) { params[this] = encode(value) }
infix fun <T, U: ReturnValue<T>>U.to(value: U) { params[this] = value }
infix fun <T: Any, U: NotNull<T>>Nullable<T, U>.to(value: U) { params[this] = value }
}
}

0 comments on commit c96a209

Please sign in to comment.