Create Missing Column Families

Summary: Provide an convenience option to create column families if they are missing from the DB. Task #4460490

Test Plan: added unit test. also, stress test for some time

Reviewers: sdong, haobo, dhruba, ljin, yhchiang

Reviewed By: yhchiang

Subscribers: yhchiang, leveldb

Differential Revision: https://reviews.facebook.net/D18951
This commit is contained in:
Igor Canadi
2014-06-06 18:04:56 -07:00
parent 99d3eed2fd
commit a0191c9dfe
5 changed files with 45 additions and 17 deletions

View File

@@ -595,6 +595,10 @@ struct DBOptions {
// Default: false
bool create_if_missing;
// If true, missing column families will be automatically created.
// Default: false
bool create_missing_column_families;
// If true, an error is raised if the database already exists.
// Default: false
bool error_if_exists;