#coding=utf-8

from tornado.options import define, options
import torndb

define("mysql_host", default="rdsjqqyabiqvfav.mysql.rds.aliyuncs.com", help="mysql host")
define("mysql_user", default="baoziapp", help="mysql user")
define("mysql_password", default="eGsDyJFCVKFM5ZsM", help="mysql password")
#define("mysql_host", default="/var/lib/mysql/mysql.sock", help="mysql host")
#define("mysql_user", default="root", help="mysql user")
#define("mysql_password", default="showmeng1234", help="mysql password")
define("mysql_db", default="cardb", help="mysql database")

class DBUtil:
  def __init__(self):
    self.connect()

  def connect(self):
    self.conn = torndb.Connection(
        options.mysql_host, 
        options.mysql_db, 
        options.mysql_user, 
        options.mysql_password,
        60, #max_idle_time
        1,  #connect_timeout
        '+8:00' 
        )
  
  def get(self, sql):
    return self.conn.get(sql)

  def query(self, sql):
    return self.conn.query(sql)

  def execute(self, sql):
    self.conn.execute(sql)

371b8e1f5a51214090105ede31fd6a4b285d2172
<mask token>


class DBUtil:

    def __init__(self):
        self.connect()
    <mask token>

    def get(self, sql):
        return self.conn.get(sql)

    def query(self, sql):
        return self.conn.query(sql)
    <mask token>

<mask token>


class DBUtil:

    def __init__(self):
        self.connect()

    def connect(self):
        self.conn = torndb.Connection(options.mysql_host, options.mysql_db,
            options.mysql_user, options.mysql_password, 60, 1, '+8:00')

    def get(self, sql):
        return self.conn.get(sql)

    def query(self, sql):
        return self.conn.query(sql)

    def execute(self, sql):
        self.conn.execute(sql)

<mask token>
define('mysql_host', default='rdsjqqyabiqvfav.mysql.rds.aliyuncs.com', help
    ='mysql host')
define('mysql_user', default='baoziapp', help='mysql user')
define('mysql_password', default='eGsDyJFCVKFM5ZsM', help='mysql password')
define('mysql_db', default='cardb', help='mysql database')


class DBUtil:

    def __init__(self):
        self.connect()

    def connect(self):
        self.conn = torndb.Connection(options.mysql_host, options.mysql_db,
            options.mysql_user, options.mysql_password, 60, 1, '+8:00')

    def get(self, sql):
        return self.conn.get(sql)

    def query(self, sql):
        return self.conn.query(sql)

    def execute(self, sql):
        self.conn.execute(sql)

from tornado.options import define, options
import torndb
define('mysql_host', default='rdsjqqyabiqvfav.mysql.rds.aliyuncs.com', help
    ='mysql host')
define('mysql_user', default='baoziapp', help='mysql user')
define('mysql_password', default='eGsDyJFCVKFM5ZsM', help='mysql password')
define('mysql_db', default='cardb', help='mysql database')


class DBUtil:

    def __init__(self):
        self.connect()

    def connect(self):
        self.conn = torndb.Connection(options.mysql_host, options.mysql_db,
            options.mysql_user, options.mysql_password, 60, 1, '+8:00')

    def get(self, sql):
        return self.conn.get(sql)

    def query(self, sql):
        return self.conn.query(sql)

    def execute(self, sql):
        self.conn.execute(sql)

#coding=utf-8

from tornado.options import define, options
import torndb

define("mysql_host", default="rdsjqqyabiqvfav.mysql.rds.aliyuncs.com", help="mysql host")
define("mysql_user", default="baoziapp", help="mysql user")
define("mysql_password", default="eGsDyJFCVKFM5ZsM", help="mysql password")
#define("mysql_host", default="/var/lib/mysql/mysql.sock", help="mysql host")
#define("mysql_user", default="root", help="mysql user")
#define("mysql_password", default="showmeng1234", help="mysql password")
define("mysql_db", default="cardb", help="mysql database")

class DBUtil:
  def __init__(self):
    self.connect()

  def connect(self):
    self.conn = torndb.Connection(
        options.mysql_host, 
        options.mysql_db, 
        options.mysql_user, 
        options.mysql_password,
        60, #max_idle_time
        1,  #connect_timeout
        '+8:00' 
        )
  
  def get(self, sql):
    return self.conn.get(sql)

  def query(self, sql):
    return self.conn.query(sql)

  def execute(self, sql):
    self.conn.execute(sql)
