Calls mdb_cursor_get and does some error checking.
- Parameters
-
| cur | is given to mdb_cursor_get without modification. |
| op | is passed to mdb_cursor_get without modification. |
| key | expected key size or 0 to skip key size check. |
| value | expected value size or 0 to skip value size check. |
- Exceptions
-
| std::system_error | if key != 0 and key_.mv_size != key. |
| std::system_error | if value != 0 and value_.mv_size != value. |
| std::system_error | if mdb_cursor_get returns any error other than MDB_NOTFOUND. |
- Returns
- {key bytes, value bytes} or two empty spans if MDB_NOTFOUND.