File tree 2 files changed +12
-1
lines changed
examples/pgsql_test/source
2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 1
1
import std.stdio ;
2
2
3
3
import ddbc.all;
4
+ import ddbc.pods;
4
5
5
6
int main (string [] argv)
6
7
{
@@ -65,6 +66,14 @@ int main(string[] argv)
65
66
PreparedStatement ps = conn.prepareStatement(" INSERT INTO bintest (id, blob1) VALUES (1, ?)" );
66
67
ps.setUbytes(1 , bin_data);
67
68
ps.executeUpdate();
69
+ struct Bintest {
70
+ long id;
71
+ ubyte [] blob1;
72
+ }
73
+ Bintest[] rows;
74
+ foreach (e; stmt.select! Bintest)
75
+ rows ~= e;
76
+ // stmt!
68
77
auto rs2 = stmt.executeQuery(" SELECT id, blob1 FROM bintest WHERE id=1" );
69
78
if (rs2.next()) {
70
79
ubyte [] res = rs2.getUbytes(2 );
Original file line number Diff line number Diff line change @@ -418,7 +418,9 @@ version(USE_PGSQL) {
418
418
lock();
419
419
scope (exit) unlock ();
420
420
421
- assert (0 , " AUTOCOMMIT is no longer supported." );
421
+ autocommit = true ;
422
+
423
+ // assert(0, "AUTOCOMMIT is no longer supported.");
422
424
}
423
425
}
424
426
You can’t perform that action at this time.
0 commit comments