Skip to content
Snippets Groups Projects
Commit 73edfba8 authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[database] Remove use of Prefix

parent a6a499b4
Branches
Tags
1 merge request!17Merge development branch 1.5.x
......@@ -52,8 +52,7 @@ class Storage(utils.CodeStorage):
Parameters:
prefix (beat.backend.python.utils.Prefix): Establishes the prefix of
your installation.
prefix (str): Establishes the prefix of your installation.
name (str): The name of the database object in the format
``<name>/<version>``.
......@@ -67,13 +66,9 @@ class Storage(utils.CodeStorage):
self.name, self.version = name.split('/')
self.fullname = name
self.prefix = prefix
if isinstance(prefix, utils.Prefix):
self.prefix = prefix
else:
self.prefix = utils.Prefix(prefix)
path = self.prefix.path(os.path.join('databases', name + '.json'))
path = os.path.join(self.prefix, 'databases', name + '.json')
path = path[:-5]
super(Storage, self).__init__(path, 'python') #views are coded in Python
......@@ -91,8 +86,7 @@ class Runner(object):
module (module): The preloaded module containing the database views as
returned by :py:func:`beat.core.loader.load_module`.
prefix (beat.backend.python.utils.Prefix): Establishes the prefix of
your installation.
prefix (str): Establishes the prefix of your installation.
root_folder (str, path): The path pointing to the root folder of this
database
......@@ -198,8 +192,7 @@ class Database(object):
Parameters:
prefix (beat.backend.python.utils.Prefix): Establishes the prefix of
your installation.
prefix (str): Establishes the prefix of your installation.
name (str): The fully qualified database name (e.g. ``db/1``)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment