Overview
Comment: | Remove -[PGConnection insertRow:]
It can be used in a way that leads to security issues, so it's better |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
30633656b050a8f3f41989bed97bb200 |
User & Date: | js 2024-08-11 17:22:05 |
Context
2024-08-11
| ||
17:45 | Add documentation check-in: e4c8de38e0 user: js tags: trunk | |
17:22 | Remove -[PGConnection insertRow:] check-in: 30633656b0 user: js tags: trunk | |
09:22 | Change license to unmodified ISC check-in: 31c5599df5 user: js tags: trunk | |
Changes
Changes to src/PGConnection.h.
︙ | ︙ | |||
37 38 39 40 41 42 43 | - (void)connect; - (void)reset; - (void)close; - (nullable PGResult *)executeCommand: (OFConstantString *)command; - (nullable PGResult *)executeCommand: (OFConstantString *)command parameters: (id)firstParameter, ... OF_SENTINEL; | < < < | 37 38 39 40 41 42 43 44 45 46 | - (void)connect; - (void)reset; - (void)close; - (nullable PGResult *)executeCommand: (OFConstantString *)command; - (nullable PGResult *)executeCommand: (OFConstantString *)command parameters: (id)firstParameter, ... OF_SENTINEL; @end OF_ASSUME_NONNULL_END |
Changes to src/PGConnection.m.
︙ | ︙ | |||
160 161 162 163 164 165 166 | default: PQclear(result); @throw [PGCommandFailedException exceptionWithConnection: self command: command]; } } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 160 161 162 163 164 165 166 167 | default: PQclear(result); @throw [PGCommandFailedException exceptionWithConnection: self command: command]; } } @end |
Changes to tests/Tests.m.
︙ | ︙ | |||
55 56 57 58 59 60 61 | parameters: [OFNumber numberWithInt: 1], @"foo", @"Hallo Welt!", nil]; [_connection executeCommand: @"INSERT INTO test (id, content, success) " @"VALUES ($1, $2, $3)" parameters: [OFNumber numberWithInt: 2], [OFNumber numberWithInt: 2], [OFNumber numberWithBool: true], nil]; | < < < | 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | parameters: [OFNumber numberWithInt: 1], @"foo", @"Hallo Welt!", nil]; [_connection executeCommand: @"INSERT INTO test (id, content, success) " @"VALUES ($1, $2, $3)" parameters: [OFNumber numberWithInt: 2], [OFNumber numberWithInt: 2], [OFNumber numberWithBool: true], nil]; result = [_connection executeCommand: @"SELECT * FROM test"]; OFLog(@"%@", result); OFLog(@"JSON: %@", [result JSONRepresentation]); for (id row in result) for (id col in row) |
︙ | ︙ |