├── .gitignore ├── AUTHORS ├── AndroidManifest.xml ├── LICENSE ├── Makefile ├── NEWS ├── NotePadSample ├── AndroidManifest.xml ├── assets │ └── sample.json ├── res │ ├── drawable-hdpi-v6 │ │ ├── app_notes.png │ │ └── live_folder_notes.png │ ├── drawable-hdpi │ │ └── app_notes.png │ ├── drawable-ldpi-v6 │ │ ├── app_notes.png │ │ └── live_folder_notes.png │ ├── drawable-mdpi-v6 │ │ ├── app_notes.png │ │ └── live_folder_notes.png │ ├── drawable-mdpi │ │ ├── app_notes.png │ │ └── live_folder_notes.png │ ├── layout │ │ ├── note_editor.xml │ │ ├── noteslist_item.xml │ │ └── title_editor.xml │ └── values │ │ └── strings.xml ├── src │ └── com │ │ └── example │ │ └── android │ │ └── notepad │ │ ├── DBBenchmarkActivity.java │ │ ├── NoteEditor.java │ │ ├── NotesList.java │ │ ├── NotesLiveFolder.java │ │ └── TitleEditor.java └── tests │ ├── AndroidManifest.xml │ ├── build.properties │ └── src │ └── com │ └── example │ └── android │ └── notepad │ └── NotePadTest.java ├── README ├── TODO ├── assets └── sample.json ├── build_detect_platform ├── common.mk ├── db ├── builder.cc ├── builder.h ├── c.cc ├── c_test.c ├── corruption_test.cc ├── db_bench.cc ├── db_impl.cc ├── db_impl.h ├── db_iter.cc ├── db_iter.h ├── db_test.cc ├── dbformat.cc ├── dbformat.h ├── dbformat_test.cc ├── filename.cc ├── filename.h ├── filename_test.cc ├── log_format.h ├── log_reader.cc ├── log_reader.h ├── log_test.cc ├── log_writer.cc ├── log_writer.h ├── memtable.cc ├── memtable.h ├── repair.cc ├── skiplist.h ├── skiplist_test.cc ├── snapshot.h ├── table_cache.cc ├── table_cache.h ├── version_edit.cc ├── version_edit.h ├── version_edit_test.cc ├── version_set.cc ├── version_set.h ├── version_set_test.cc ├── write_batch.cc ├── write_batch_internal.h └── write_batch_test.cc ├── doc ├── bench │ ├── db_bench_sqlite3.cc │ └── db_bench_tree_db.cc ├── benchmark.html ├── doc.css ├── impl.html ├── index.html ├── log_format.txt └── table_format.txt ├── helpers └── memenv │ ├── memenv.cc │ ├── memenv.h │ └── memenv_test.cc ├── include └── leveldb │ ├── c.h │ ├── cache.h │ ├── comparator.h │ ├── db.h │ ├── env.h │ ├── iterator.h │ ├── options.h │ ├── slice.h │ ├── status.h │ ├── table.h │ ├── table_builder.h │ └── write_batch.h ├── jni ├── Android.mk ├── Application.mk └── main.cc ├── port ├── README ├── atomic_pointer.h ├── port.h ├── port_android.cc ├── port_android.h ├── port_example.h ├── port_posix.cc ├── port_posix.h └── win │ └── stdint.h ├── res └── values │ └── strings.xml ├── src └── com │ └── google │ └── code │ └── p │ └── leveldb │ ├── LevelDB.java │ └── provider │ ├── LevelDBProvider.java │ ├── NotePad.java │ ├── NotePadLevelDBProvider.java │ └── NotePadSQLiteProvider.java ├── table ├── block.cc ├── block.h ├── block_builder.cc ├── block_builder.h ├── format.cc ├── format.h ├── iterator.cc ├── iterator_wrapper.h ├── merger.cc ├── merger.h ├── table.cc ├── table_builder.cc ├── table_test.cc ├── two_level_iterator.cc └── two_level_iterator.h ├── tests ├── AndroidManifest.xml ├── default.properties └── src │ └── com │ └── example │ └── HelloJni │ └── HelloJniTest.java └── util ├── arena.cc ├── arena.h ├── arena_test.cc ├── cache.cc ├── cache_test.cc ├── coding.cc ├── coding.h ├── coding_test.cc ├── comparator.cc ├── crc32c.cc ├── crc32c.h ├── crc32c_test.cc ├── env.cc ├── env_posix.cc ├── env_test.cc ├── hash.cc ├── hash.h ├── histogram.cc ├── histogram.h ├── logging.cc ├── logging.h ├── mutexlock.h ├── options.cc ├── posix_logger.h ├── random.h ├── status.cc ├── testharness.cc ├── testharness.h ├── testutil.cc └── testutil.h /.gitignore: -------------------------------------------------------------------------------- 1 | # private constants # 2 | NonPublicConstants.java 3 | 4 | .externalToolBuilders 5 | .cproject 6 | .project 7 | .settings 8 | .classpath 9 | project.properties 10 | 11 | bin 12 | gen 13 | obj 14 | libs 15 | 16 | # Compiled source # 17 | ################### 18 | target 19 | *.com 20 | *.class 21 | *.dll 22 | *.exe 23 | #*.o 24 | #*.so 25 | 26 | # Packages # 27 | ############ 28 | # it's better to unpack these files and commit the raw source 29 | # git has its own built in compression methods 30 | *.7z 31 | *.dmg 32 | *.gz 33 | *.iso 34 | *.jar 35 | *.rar 36 | *.tar 37 | *.zip 38 | 39 | # Logs and databases # 40 | ###################### 41 | #*.log 42 | #*.sql 43 | #*.sqlite 44 | 45 | # OS generated files # 46 | ###################### 47 | .DS_Store 48 | ehthumbs.db 49 | Icon? 50 | Thumbs.db 51 | 52 | lint.xml 53 | 54 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | # Names should be added to this file like so: 2 | # Name or Organization 3 | 4 | Google Inc. 5 | 6 | # Initial version authors: 7 | Jeffrey Dean 8 | Sanjay Ghemawat 9 | -------------------------------------------------------------------------------- /AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 10 | 11 | 12 | 13 | 18 | 19 | 22 | 23 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011 The LevelDB Authors. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following disclaimer 11 | in the documentation and/or other materials provided with the 12 | distribution. 13 | * Neither the name of Google Inc. nor the names of its 14 | contributors may be used to endorse or promote products derived from 15 | this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /NEWS: -------------------------------------------------------------------------------- 1 | Release 1.2 2011-05-16 2 | ---------------------- 3 | 4 | Fixes for larger databases (tested up to one billion 100-byte entries, 5 | i.e., ~100GB). 6 | 7 | (1) Place hard limit on number of level-0 files. This fixes errors 8 | of the form "too many open files". 9 | 10 | (2) Fixed memtable management. Before the fix, a heavy write burst 11 | could cause unbounded memory usage. 12 | 13 | A fix for a logging bug where the reader would incorrectly complain 14 | about corruption. 15 | 16 | Allow public access to WriteBatch contents so that users can easily 17 | wrap a DB. 18 | -------------------------------------------------------------------------------- /NotePadSample/res/drawable-hdpi-v6/app_notes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cesine/AndroidLevelDBSample/62278915a071378b96accc787776cb39d8743351/NotePadSample/res/drawable-hdpi-v6/app_notes.png -------------------------------------------------------------------------------- /NotePadSample/res/drawable-hdpi-v6/live_folder_notes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cesine/AndroidLevelDBSample/62278915a071378b96accc787776cb39d8743351/NotePadSample/res/drawable-hdpi-v6/live_folder_notes.png -------------------------------------------------------------------------------- /NotePadSample/res/drawable-hdpi/app_notes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cesine/AndroidLevelDBSample/62278915a071378b96accc787776cb39d8743351/NotePadSample/res/drawable-hdpi/app_notes.png -------------------------------------------------------------------------------- /NotePadSample/res/drawable-ldpi-v6/app_notes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cesine/AndroidLevelDBSample/62278915a071378b96accc787776cb39d8743351/NotePadSample/res/drawable-ldpi-v6/app_notes.png -------------------------------------------------------------------------------- /NotePadSample/res/drawable-ldpi-v6/live_folder_notes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cesine/AndroidLevelDBSample/62278915a071378b96accc787776cb39d8743351/NotePadSample/res/drawable-ldpi-v6/live_folder_notes.png -------------------------------------------------------------------------------- /NotePadSample/res/drawable-mdpi-v6/app_notes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cesine/AndroidLevelDBSample/62278915a071378b96accc787776cb39d8743351/NotePadSample/res/drawable-mdpi-v6/app_notes.png -------------------------------------------------------------------------------- /NotePadSample/res/drawable-mdpi-v6/live_folder_notes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cesine/AndroidLevelDBSample/62278915a071378b96accc787776cb39d8743351/NotePadSample/res/drawable-mdpi-v6/live_folder_notes.png -------------------------------------------------------------------------------- /NotePadSample/res/drawable-mdpi/app_notes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cesine/AndroidLevelDBSample/62278915a071378b96accc787776cb39d8743351/NotePadSample/res/drawable-mdpi/app_notes.png -------------------------------------------------------------------------------- /NotePadSample/res/drawable-mdpi/live_folder_notes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cesine/AndroidLevelDBSample/62278915a071378b96accc787776cb39d8743351/NotePadSample/res/drawable-mdpi/live_folder_notes.png -------------------------------------------------------------------------------- /NotePadSample/res/layout/note_editor.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 30 | -------------------------------------------------------------------------------- /NotePadSample/res/layout/noteslist_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 26 | -------------------------------------------------------------------------------- /NotePadSample/res/layout/title_editor.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 24 | 25 | 34 | 35 |