1
|
1 import sqlite3
|
|
2 import urllib2
|
|
3
|
0
|
4 class TalosNames(object):
|
|
5 graphserver_sql = 'http://hg.mozilla.org/graphs/raw-file/tip/sql/data.sql'
|
1
|
6 schema = 'http://hg.mozilla.org/graphs/raw-file/tip/sql/schema.sql'
|
|
7
|
|
8 tables = ['os_list',
|
|
9 'branches',
|
|
10 'machines',
|
|
11 'pagesets',
|
|
12 'tests']
|
|
13
|
0
|
14 def __init__(self):
|
1
|
15 self.db = sqlite3.connect(':memory:')
|
|
16 for table in self.tables:
|
|
17 pass
|
|
18 schema = urllib2.urlopen(self.schema).read()
|
|
19 cursor = self.db.cursor()
|
|
20 cursor.executescript(schema)
|
|
21
|