/usr/share/pyshared/PyMetrics/sqltemplate.py is in pymetrics 0.8.1-6.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | """ sqltemplate - template for generating sql token output. """
__revision__ = "$Revision: 1.2 $"[11:-2]
__author__ = 'Reg. Charney <pymetrics@charneyday.com>'
tokenHdr = """--
-- Automatically generated table structure for token table `%s`
--
DROP TABLE IF EXISTS %s;
CREATE TABLE %s (
IDDateTime datetime NOT NULL default '0000-00-00 00:00:00',
ID int(11) unsigned NOT NULL auto_increment,
libraryName varchar(32) default '',
fileName varchar(255) default NULL,
lineNum int(11) NOT NULL,
colNum int(11) NOT NULL,
type varchar(16) NOT NULL default 'ERRORTOKEN',
semtype varchar(16) default NULL,
textLen int(11) NOT NULL default 1,
text varchar(255) NOT NULL default '',
fqnFunction varchar(255) default NULL,
fqnClass varchar(255) default NULL,
blockNum int(11) NOT NULL default 1,
blockDepth int(11) NOT NULL default 0,
fcnDepth int(11) NOT NULL default 0,
classDepth int(11) NOT NULL default 0,
parenDepth int(11) NOT NULL default 0,
bracketDepth int(11) NOT NULL default 0,
braceDepth int(11) NOT NULL default 0,
PRIMARY KEY (IDDateTime,ID),
FULLTEXT KEY FULLTEXTIDX (text)
) TYPE=MyISAM;
--
-- Load data for table `%s`
--
"""
tokenInsert = """INSERT INTO %s VALUES (%s);\n"""
dataHdr = """
-- Automatically generated table structure for metric data table `%s`
--
DROP TABLE IF EXISTS %s;
CREATE TABLE %s (
IDDateTime datetime NOT NULL default '0000-00-00 00:00:00',
ID int(10) unsigned NOT NULL auto_increment,
libraryName varchar(32) default '',
metricName varchar(32) NOT NULL default '',
srcFileName varchar(255) NOT NULL default '',
varName varchar(255) NOT NULL default '',
value decimal(15,5) NOT NULL default '0',
PRIMARY KEY (IDDateTime,ID)
) TYPE=MyISAM;
--
-- Load metric data for table `%s`
--
"""
dataInsert = """INSERT INTO %s VALUES (%s);\n"""
|