9 DATABASE =
'trans_data' 16 self.
d_addColumn(
"string_id", kInteger, primarykey=1, autoincrement=1)
30 self.
d_addColumn(
"loc_id", kInteger, primarykey=1, autoincrement=1)
33 self.
d_addColumn(
"filename", kVarString, 255, indexed=1)
44 self.
d_addColumn(
"string_id", kInteger, primarykey=1)
45 self.
d_addColumn(
"lang", kFixedString, 2, primarykey=1)
54 self.
addTable(
"strings",
"nt_trans_strings", TransStringTable)
55 self.
addTable(
"locs",
"nt_trans_locs", TransLocTable)
56 self.
addTable(
"maps",
"nt_trans_maps", TransMapTable)
70 if host !=
'localhost':
71 local_name = socket.gethostname()
72 if string.find(local_name,
'.') == -1:
73 local_name = local_name +
".neotonic.com" 74 if local_name == host:
78 db = MySQLdb.connect(host = host, user=USER, passwd = PASSWORD, db=DATABASE)
81 retval =
DB(db, debug=debug)
def trans_connect(host='localhost', debug=0)
def __init__(self, db, debug=0)
def d_addColumn(self, col_name, ctype, size=None, primarykey=0, notnull=0, indexed=0, default=None, unique=0, autoincrement=0, autoguid=0, safeupdate=0, enum_values=None, no_export=0, relations=None, foreign_key=None, compress_ok=0, int_date=0)
def addTable(self, attrname, tblname, tblclass, rowClass=None, check=0, create=0, rowListClass=None, replication=None)
hmm, on second thought, storing this is in the database is kind of silly..., since it essentially cou...