Skip to content

Commit

Permalink
add NewMemEnv
Browse files Browse the repository at this point in the history
  • Loading branch information
flxflx committed Dec 11, 2019
1 parent eb0a0d0 commit bbc5fe7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions env.go
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit bbc5fe7

Please sign in to comment.