memsql/common/sql_utility.py
def connect(self, host='127.0.0.1', port=3306, user='root', password='', database=None):
        """ Connect to the database specified """

        if database is None:
            raise exceptions.RequiresDatabase()

        self._db_args = { 'host': host, 'port': port, 'user': user, 'password': password, 'database': database }
        with self._db_conn() as conn:
            conn.query('SELECT 1')
        return self
def connect(self, host='127.0.0.1', port=3306, user='root', password='', database=None):
        """ Connect to the database specified """

        if database is None:
            raise exceptions.RequiresDatabase()

        self._db_args = { 'host': host, 'port': port, 'user': user, 'password': password, 'database': database }
        with self._db_conn() as conn:
            conn.query('SELECT 1')
        return self
Connect to the database specified