Function common::datastore [] [src]

pub fn datastore() -> ProxyDatastore

Creates a new datastore.

This looks at the DATABASE_URL environment variable to figure out which datastore to use. If it starts with rocksdb://, the rocksdb implementation is used. If it starts with postgres://, the postgres implementation is used.

Errors

Returns an error if we are unable to figure out what kind of datastore to use.