sequel_pg 1.6.2 → 1.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG +4 -0
- data/ext/sequel_pg/sequel_pg.c +19 -0
- metadata +2 -2
data/CHANGELOG
CHANGED
data/ext/sequel_pg/sequel_pg.c
CHANGED
@@ -932,11 +932,30 @@ static VALUE spg__yield_each_row(VALUE self) {
|
|
932
932
|
static VALUE spg__flush_results(VALUE rconn) {
|
933
933
|
PGconn *conn;
|
934
934
|
PGresult *res;
|
935
|
+
VALUE error = 0;
|
935
936
|
Data_Get_Struct(rconn, PGconn, conn);
|
936
937
|
|
937
938
|
while ((res = PQgetResult(conn)) != NULL) {
|
939
|
+
if (!error) {
|
940
|
+
switch (PQresultStatus(res))
|
941
|
+
{
|
942
|
+
case PGRES_BAD_RESPONSE:
|
943
|
+
case PGRES_FATAL_ERROR:
|
944
|
+
case PGRES_NONFATAL_ERROR:
|
945
|
+
error = rb_str_new2(PQresultErrorMessage(res));
|
946
|
+
break;
|
947
|
+
default:
|
948
|
+
break;
|
949
|
+
}
|
950
|
+
}
|
938
951
|
PQclear(res);
|
939
952
|
}
|
953
|
+
|
954
|
+
if (error) {
|
955
|
+
VALUE exception = rb_exc_new3(spg_PGError, error);
|
956
|
+
rb_iv_set(exception, "@connection", rconn);
|
957
|
+
rb_exc_raise(exception);
|
958
|
+
}
|
940
959
|
|
941
960
|
return rconn;
|
942
961
|
}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sequel_pg
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-11-
|
12
|
+
date: 2012-11-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: pg
|