파이썬의 leveldb 바인딩을 사용하여 데이터를 저장하고 싶습니다. 나는 미리 알지 못하고 모든 키를 반복하는 방법을 문서에서 볼 수 없습니다. https://rawgit.com/google/leveldb/master/doc/index.html 페이지의 C 바인딩에서 가능합니다.
leveldb::Iterator* it = db->NewIterator(leveldb::ReadOptions());
for (it->SeekToFirst(); it->Valid(); it->Next()) {
cout << it->key().ToString() << ": " << it->value().ToString() << endl;
}
assert(it->status().ok()); // Check for any errors found during the scan
delete it;
파이썬 내에서 어떻게 할 수 있습니까?
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다