Lze si vystačit s C knihovnou a napsat si jednoduchý wrapper. Ta C knihovna je podobná jako v PHP.
PS: Abych namlsal, mám wrapper, se kterým se pracuje takto:
while(sqlconn.start()) try {
MySQL::Result res = sqlconn("SELECT * FROM %1 WHERE `id`=%2")
.field(tableName).arg(curId).exec();
while (res.hasItems()) {
MySQL::Row r = res.getNext();
int cols = res.countFields();
for (int i = 0; i < cols; i++) if (! r[i].isNull() ){
String key = res.getFieldName(i);
String val = r[i];
//... zkraceno ...
}
}
} catch (const MySQL::ServerError_t &e) {
sqlconn.except(e,THISLOCATION);
}
sqlconn.commit();
Řeší i deadlock v transakci (proto ten while). Ale zatím není open source (možná někdy bude). Takže jen pro inspiraci