diff --git a/env.go b/env.go index 386335bc..11e84ef8 100644 --- a/env.go +++ b/env.go @@ -13,6 +13,11 @@ func NewDefaultEnv() *Env { return NewNativeEnv(C.rocksdb_create_default_env()) } +// NewMemEnv creates MemEnv for in-memory testing. +func NewMemEnv() *Env { + return NewNativeEnv(C.rocksdb_create_mem_env()) +} + // NewNativeEnv creates a Environment object. func NewNativeEnv(c *C.rocksdb_env_t) *Env { return &Env{c}