Skip to content

Commit 0cb04dd

Browse files
committed
Restored previous parse parameters
1 parent 78b08eb commit 0cb04dd

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

src/halfvec.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ function Base.parse(::Type{HalfVector}, pqv::LibPQ.PQBinaryValue{OID}) where {OI
2626
HalfVector(vec)
2727
end
2828

29-
function Base.parse(::Type{HalfVector}, pqv::LibPQ.PQTextValue{OID}) where {OID}
30-
s = unsafe_string(pqv)
29+
function Base.parse(::Type{HalfVector}, s::String)
3130
HalfVector(map(x -> Base.parse(Float16, x), split(s[2:end-1], ",")))
3231
end
3332

src/sparsevec.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ function Base.parse(::Type{SparseVector}, pqv::LibPQ.PQBinaryValue{OID}) where {
3636
SparseVector(sparsevec(indices, values, dim))
3737
end
3838

39-
function Base.parse(::Type{SparseVector}, pqv::LibPQ.PQTextValue{OID}) where {OID}
40-
s = unsafe_string(pqv)
39+
function Base.parse(::Type{SparseVector}, s::String)
4140
elements, dim = rsplit(s, "/"; limit=2)
4241
elements = map(e -> split(e, ":"; limit=2), split(elements[2:end-1], ","))
4342
indices = map(v -> Base.parse(Int32, v[1]), elements)

src/vector.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ function Base.parse(::Type{Vector}, pqv::LibPQ.PQBinaryValue{OID}) where {OID}
2626
Vector(vec)
2727
end
2828

29-
function Base.parse(::Type{Vector}, pqv::LibPQ.PQTextValue{OID}) where {OID}
30-
s = unsafe_string(pqv)
29+
function Base.parse(::Type{Vector}, s::String)
3130
Vector(map(x -> Base.parse(Float32, x), split(s[2:end-1], ",")))
3231
end
3332

0 commit comments

Comments
 (0)