コード例 #1
0
ファイル: __init__.py プロジェクト: shalintripathi/cruzdb
    def __init__(self, db="", user="******", host="genome-mysql.cse.ucsc.edu", password=""):
        self.db = db
        self.user = user
        self.host = host
        self.password = (":" + password) if password else ""
        self.dburl = self.url % dict(db=self.db, user=self.user,
            host=self.host, password=self.password)
        self.engine = create_engine(self.dburl)

        self.session, self.Base = initialize_sql(self.engine)
        self.models = __import__("models", globals(), locals(), ["Mixin"], -1)
コード例 #2
0
ファイル: __init__.py プロジェクト: novosel65/cruzdb
    def __init__(self, db="", user="******", host="genome-mysql.cse.ucsc.edu", password=""):
        self.db = db
        self.user = user
        self.host = host
        self.password = (":" + password) if password else ""
        self.dburl = self.url % dict(db=self.db, user=self.user,
            host=self.host, password=self.password)
        self.engine = create_engine(self.dburl)

        self.session, self.Base = initialize_sql(self.engine)
        self.models = __import__("models", globals(), locals(), ["Mixin"], -1)
コード例 #3
0
ファイル: __init__.py プロジェクト: daler/cruzdb
    def __init__(self, db="", user="******", host="genome-mysql.cse.ucsc.edu", password=""):
        if db.startswith(("sqlite://", "mysql://", "postgresql://")):
            self.url = db
            self.dburl = db
            self.user = self.host = self.password = ""
        else:
            self.db = db
            self.user = user
            self.host = host
            self.password = (":" + password) if password else ""
            self.dburl = self.url % dict(db=self.db, user=self.user,
                host=self.host, password=self.password)

        self.engine = create_engine(self.dburl)

        self.session, self.Base = initialize_sql(self.engine)
        self.models = __import__("models", globals(), locals(), ["Feature"], -1)