database

authors:Rémi GATTAZ
copyright:Copyright 2015, IsandlaTech
license:Apache Software License 2.0
class restbuilder.database.Database

Bases: object

Database handler

base()

Return the base (See sqlalchemy documentation)

createAll()

Create the database using all previously created models extending the base (See sqlalchemy documentation)

session()

Return a newly created session on the database

validate(aContext)

Initialisation of the database component

class restbuilder.database.DeclarativeABCMeta(classname, bases, dict_)

Bases: sqlalchemy.ext.declarative.api.DeclarativeMeta, abc.ABCMeta

Create an abstract declarative meta for the declarative base. That way, Model classes will be able to inherit an abstract class and the declarative base