Changeset 80
- Timestamp:
- 01/22/08 19:05:32 (10 months ago)
- Files:
-
- trunk/dbi/pg/PgDatabase.d (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/dbi/pg/PgDatabase.d
r70 r80 7 7 version (dbi_pg) { 8 8 9 10 version (Phobos) { 11 private import std.string : toDString = toString, toCString = toStringz; 12 debug (UnitTest) private static import std.stdio; 13 } else { 14 private import tango.stdc.stringz : toDString = fromUtf8z, toCString = toUtf8z; 9 private import tango.stdc.stringz : toDString = fromUtf8z, toCString = toStringz; 15 10 debug (UnitTest) private static import tango.io.Stdout; 16 11 } … … 207 202 } 208 203 204 /** 205 * Get the integer id of the last row to be inserted. 206 * 207 * Returns: 208 * The id of the last row inserted into the database. 209 */ 210 override long getLastInsertID() { 211 // TODO: Somehow use PQoidValue with the last INSERT result 212 return 0; 213 } 214 209 215 private: 210 216 PGconn* connection; … … 213 219 214 220 unittest { 215 version (Phobos) { 216 void s1 (char[] s) { 217 std.stdio.writefln("%s", s); 218 } 219 220 void s2 (char[] s) { 221 std.stdio.writefln(" ...%s", s); 222 } 223 } else { 224 void s1 (char[] s) { 225 tango.io.Stdout.Stdout(s).newline(); 226 } 227 228 void s2 (char[] s) { 229 tango.io.Stdout.Stdout(" ..." ~ s).newline(); 230 } 231 } 221 void s1 (char[] s) { 222 tango.io.Stdout.Stdout(s).newline(); 223 } 224 225 void s2 (char[] s) { 226 tango.io.Stdout.Stdout(" ..." ~ s).newline(); 227 } 232 228 233 229 s1("dbi.pg.PgDatabase:"); … … 276 272 db.close(); 277 273 } 278 }
