コード例 #1
0
ファイル: ServerStats.py プロジェクト: wallydz/BitBlinder
def _create_table(statType, cur):
    stat = statType()
    tableName = stat._get_table_name()
    if not DBUtil.table_exists(cur, tableName):
        sql = "CREATE TABLE %s (time TIMESTAMP WITHOUT TIME ZONE, value REAL);" % (
            tableName)
        cur.execute(sql)
コード例 #2
0
ファイル: ServerStats.py プロジェクト: clawplach/BitBlinder
def _create_table(statType, cur):
  stat = statType()
  tableName = stat._get_table_name()
  if not DBUtil.table_exists(cur, tableName):
    sql = "CREATE TABLE %s (time TIMESTAMP WITHOUT TIME ZONE, value REAL);" % (tableName)
    cur.execute(sql)