Skip to content

Commit

Permalink
Merge pull request #3 from lucianolorenti/julia_1.0
Browse files Browse the repository at this point in the history
Changes PostgreSQLDatabaseAdapter for julia 1.0
  • Loading branch information
essenciary authored Dec 29, 2018
2 parents 75bb6bf + 9826380 commit d237fa5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/database_adapters/PostgreSQLDatabaseAdapter.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module PostgreSQLDatabaseAdapter

using LibPQ, DataFrames, DataStreams, NamedTuples, Nullables
using LibPQ, DataFrames, DataStreams, Nullables
using SearchLight, SearchLight.Database, SearchLight.Loggers

export DatabaseHandle, ResultHandle
Expand Down Expand Up @@ -257,7 +257,7 @@ function to_store_sql(m::T; conflict_strategy = :error)::String where {T<:Abstra

sql = if ! is_persisted(m) || (is_persisted(m) && conflict_strategy == :update)
pos = findfirst(x -> x == primary_key_name(m), uf)
pos > 0 && splice!(uf, pos)
pos != nothing && splice!(uf, pos)

fields = SQLColumn(uf)
vals = join( map(x -> string(to_sqlinput(m, Symbol(x), getfield(m, Symbol(x)))), uf), ", ")
Expand Down

0 comments on commit d237fa5

Please sign in to comment.