65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
[OFNumber numberWithInt: 2],
[OFNumber numberWithBool: true], nil];
[_connection insertRow: [OFDictionary dictionaryWithKeysAndObjects:
@"content", @"Hallo!", @"name", @"foo", nil]
intoTable: @"test"];
result = [_connection executeCommand: @"SELECT * FROM test"];
of_log(@"%@", result);
of_log(@"JSON: %@", [result JSONRepresentation]);
for (id row in result)
for (id col in row)
of_log(@"%@", col);
result = [_connection executeCommand: @"SELECT COUNT(*) FROM test"];
of_log(@"%@", result);
[OFApplication terminate];
}
@end
|
|
|
|
|
|
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
[OFNumber numberWithInt: 2],
[OFNumber numberWithBool: true], nil];
[_connection insertRow: [OFDictionary dictionaryWithKeysAndObjects:
@"content", @"Hallo!", @"name", @"foo", nil]
intoTable: @"test"];
result = [_connection executeCommand: @"SELECT * FROM test"];
OFLog(@"%@", result);
OFLog(@"JSON: %@", [result JSONRepresentation]);
for (id row in result)
for (id col in row)
OFLog(@"%@", col);
result = [_connection executeCommand: @"SELECT COUNT(*) FROM test"];
OFLog(@"%@", result);
[OFApplication terminate];
}
@end
|