sp_delete - delete operation
int sp_delete(void *object, void *document);
sp_delete(database, document): do a single-statement transaction.
sp_delete(transaction, document): do a key deletion as a part of multi-statement transaction.
Object must be prepared by setting key fields. Value is not used for delete operation. It is important that while setting key fields, only pointers are copied. Real data copies only during first operation.
char key = "key"; void *o = sp_document(db); sp_setstring(o, "key", key, sizeof(key)); sp_delete(db, o);
On success, sp_delete() returns 0. On error, it returns -1.
Database object commit: (1) rollback or (2) lock.