JuliaDatabases / PostgreSQL.jl

DEPRECATED: use LibPQ.jl instead
https://github.com/invenia/LibPQ.jl
Other
60 stars 39 forks source link

Add copy functionality. #35

Closed syadlowsky closed 8 years ago

syadlowsky commented 8 years ago

I've added a copy function. This is, unfortunately, not defined in the DBI interface, so I added it as a separate function of PostgreSQL.

coveralls commented 8 years ago

Coverage Status

Coverage decreased (-4.2%) to 70.892% when pulling 8a2e9ccacaebfa335ecc188b2270bc8841586bc8 on syadlowsky:master into f073145a2aeb6311136c7eb7d4f3d82687ff53b7 on JuliaDB:master.

coveralls commented 8 years ago

Coverage Status

Coverage decreased (-5.5%) to 69.585% when pulling 54fa290f22570de78ba8b5f4cc3776692c66dfe1 on syadlowsky:master into f073145a2aeb6311136c7eb7d4f3d82687ff53b7 on JuliaDB:master.

iamed2 commented 8 years ago

This looks good; just please add a test :)

coveralls commented 8 years ago

Coverage Status

Coverage decreased (-0.4%) to 74.771% when pulling b41717bcab1e00b0aed22e8d2ad7c62be60d6293 on syadlowsky:master into f073145a2aeb6311136c7eb7d4f3d82687ff53b7 on JuliaDB:master.

syadlowsky commented 8 years ago

Added a test. The decreased coverage is an all-hell-breaks-loose type of error for which I check, but don't know how to test without the database dying in between.

iamed2 commented 8 years ago

I just noticed you don't check the error status of PQputCopyData; please do that. You can move the existing error code you wrote into a function and call that function each time; that way you can test the error code by just providing a malformed CSV file.

coveralls commented 8 years ago

Coverage Status

Coverage increased (+1.1%) to 76.256% when pulling 8b2a843959394586f5fdd14eb41944a2e7230f87 on syadlowsky:master into f073145a2aeb6311136c7eb7d4f3d82687ff53b7 on JuliaDB:master.

iamed2 commented 8 years ago

Excellent, thanks!