Overview
Comment: | Move private methods to separate headers
Also fixes a typo and adds two missing nullability annotations. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
6307a381989719ad89067e1ae2cb5d45 |
User & Date: | js on 2017-05-10 23:46:05 |
Other Links: | manifest | tags |
Context
2017-05-10
| ||
23:51 | Do not depend on object literals for tests check-in: 2105581c29 user: js tags: trunk | |
23:46 | Move private methods to separate headers check-in: 6307a38198 user: js tags: trunk | |
2017-05-09
| ||
23:19 | Adjust to recent ObjFW changes check-in: fc8e42990e user: js tags: trunk | |
Changes
Added src/PGConnection+Private.h version [1ea31d7eef].
Modified src/PGConnection.h from [89f43193e6] to [6e9f843adc].
1 2 3 4 5 6 7 8 9 10 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | - + - - + + - | #include <libpq-fe.h> #import <ObjFW/ObjFW.h> #import "PGResult.h" OF_ASSUME_NONNULL_BEGIN @interface PGConnection: OFObject { |
Modified src/PGConnection.m from [12a5dca2c4] to [b625cd9199].
1 2 3 4 5 6 7 8 | 1 2 3 4 5 6 7 8 9 10 11 | + + + | #import "PGConnection.h" #import "PGConnection+Private.h" #import "PGResult.h" #import "PGResult+Private.h" #import "PGConnectionFailedException.h" #import "PGCommandFailedException.h" @implementation PGConnection @synthesize parameters = _parameters; |
︙ | |||
30 31 32 33 34 35 36 | 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | - + - + - + - - + + - + - + | if (connectionInfo != nil) [connectionInfo appendFormat: @" %@=%@", key, object]; else connectionInfo = [OFMutableString stringWithFormat: @"%@=%@", key, object]; } |
︙ | |||
122 123 124 125 126 127 128 | 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 | - + | } else if ([parameter isKindOfClass: [OFNull class]]) values[i++] = NULL; else values[i++] = [[parameter description] UTF8String]; } while ((parameter = va_arg(args, id)) != nil); |
︙ | |||
190 191 192 193 194 195 196 | 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 | - + | values[i] = [value UTF8String]; [command appendFormat: @"$%zd", ++i]; } [command appendString: @")"]; |
︙ | |||
218 219 220 221 222 223 224 | 221 222 223 224 225 226 227 228 229 230 | - + | for (OFDictionary *row in rows) [self insertRow: row intoTable: table]; } - (PGconn *)PG_connection { |
Added src/PGResult+Private.h version [1af74e4c75].
Modified src/PGResult.h from [b70e0a8f15] to [421ad0603f].
1 2 3 4 5 6 7 8 9 10 11 12 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | - - - - | #include <libpq-fe.h> #import <ObjFW/ObjFW.h> OF_ASSUME_NONNULL_BEGIN @class PGResultRow; @interface PGResult: OFArray OF_GENERIC(PGResultRow *) { PGresult *_result; } |
Modified src/PGResult.m from [1b1566e654] to [b80f854ff0].
1 2 3 4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | + - + - + | #import "PGResult.h" #import "PGResultRow.h" #import "PGResultRow+Private.h" @implementation PGResult |
︙ | |||
30 31 32 33 34 35 36 | 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | - - + + | } - (id)objectAtIndex: (size_t)index { if (index > PQntuples(_result)) @throw [OFOutOfRangeException exception]; |
Added src/PGResultRow+Private.h version [052a63f6f7].
Modified src/PGResultRow.h from [4c4b6ee6a8] to [c389ce6aac].
1 2 3 4 5 6 7 8 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | - + - - - - - | #include <libpq-fe.h> #import <ObjFW/ObjFW.h> #import "PGResult.h" OF_ASSUME_NONNULL_BEGIN |
Modified src/PGResultRow.m from [2a3cc24231] to [b6c2a37189].
1 2 3 4 5 6 7 8 | 1 2 3 4 5 6 7 8 9 | + | #import "PGResultRow.h" #import "PGResult+Private.h" static id convertType(PGresult *res, int column, OFString *string) { switch (PQftype(res, column)) { case 16: /* BOOLOID */ if ([string isEqual: @"t"]) |
︙ | |||
41 42 43 44 45 46 47 | 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | - - + + | @interface PGResultRowKeyEnumerator: PGResultRowEnumerator @end @interface PGResultRowObjectEnumerator: PGResultRowEnumerator @end @implementation PGResultRow |
︙ |
Modified src/exceptions/PGException.m from [f39a379181] to [0525cbb5f6].
1 2 3 4 5 6 7 8 | 1 2 3 4 5 6 7 8 9 | + | #import "PGException.h" #import "PGConnection+Private.h" @implementation PGException @synthesize connection = _connection; + (instancetype)exceptionWithConnection: (PGConnection *)connection { return [[[self alloc] initWithConnection: connection] autorelease]; |
︙ |