mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
Add docstrings for database schema interface
This commit is contained in:
parent
c5d55783fa
commit
4343a9297c
@ -5,19 +5,51 @@ from functools import singledispatch
|
||||
|
||||
@singledispatch
|
||||
def create_database(connection, name):
|
||||
"""Create database to be used by BigchainDB
|
||||
|
||||
Args:
|
||||
name (str): the name of the database to create.
|
||||
|
||||
Raises:
|
||||
:exc:`~bigchaindb.common.exceptions.DatabaseAlreadyExists`: If the
|
||||
given :attr:`name` already exists as a database.
|
||||
"""
|
||||
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
@singledispatch
|
||||
def create_tables(connection, name):
|
||||
"""Create the tables to be used by BigchainDB
|
||||
|
||||
Args:
|
||||
name (str): the name of the database to create tables for.
|
||||
"""
|
||||
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
@singledispatch
|
||||
def create_indexes(connection, name):
|
||||
"""Create the indexes to be used by BigchainDB
|
||||
|
||||
Args:
|
||||
name (str): the name of the database to create indexes for.
|
||||
"""
|
||||
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
@singledispatch
|
||||
def drop_database(connection, name):
|
||||
"""Drop the database used by BigchainDB
|
||||
|
||||
Args:
|
||||
name (str): the name of the database to drop.
|
||||
|
||||
Raises:
|
||||
:exc:`~bigchaindb.common.exceptions.DatabaseDoesNotExist`: If the
|
||||
given :attr:`name` does not exist as a database.
|
||||
"""
|
||||
|
||||
raise NotImplementedError
|
||||
|
Loading…
x
Reference in New Issue
Block a user