Value1 TEXT NOT NULL,\r
Value2 TEXT,\r
Value3 TEXT,\r
+ Usage TEXT,\r
Scope1 TEXT,\r
Scope2 TEXT,\r
BelongsToItem REAL NOT NULL,\r
# @param Enabled: If this item enabled\r
#\r
def Insert(self, Model, Value1, Value2, Value3, Scope1='COMMON', Scope2='COMMON',\r
- BelongsToItem=-1, BelongsToFile = -1, StartLine=-1, StartColumn=-1, EndLine=-1, EndColumn=-1, Enabled=0):\r
- (Value1, Value2, Value3, Scope1, Scope2) = ConvertToSqlString((Value1, Value2, Value3, Scope1, Scope2))\r
+ BelongsToItem=-1, BelongsToFile = -1, StartLine=-1, StartColumn=-1, EndLine=-1, EndColumn=-1, Enabled=0, Usage=''):\r
+ (Value1, Value2, Value3, Usage, Scope1, Scope2) = ConvertToSqlString((Value1, Value2, Value3, Usage, Scope1, Scope2))\r
return Table.Insert(\r
self, \r
Model, \r
Value1, \r
Value2, \r
Value3, \r
+ Usage, \r
Scope1, \r
Scope2,\r
BelongsToItem,\r
#\r
def Query(self, Model, Arch=None, Platform=None):\r
ConditionString = "Model=%s AND Enabled>=0" % Model\r
- ValueString = "Value1,Value2,Value3,Scope1,Scope2,ID,StartLine"\r
+ ValueString = "Value1,Value2,Value3,Usage,Scope1,Scope2,ID,StartLine"\r
\r
- if Arch != None and Arch != 'COMMON':\r
+ if Arch is not None and Arch != 'COMMON':\r
ConditionString += " AND (Scope1='%s' OR Scope1='COMMON')" % Arch\r
- if Platform != None and Platform != 'COMMON':\r
+ if Platform is not None and Platform != 'COMMON':\r
ConditionString += " AND (Scope2='%s' OR Scope2='COMMON' OR Scope2='DEFAULT')" % Platform\r
\r
SqlCommand = "SELECT %s FROM %s WHERE %s" % (ValueString, self.Table, ConditionString)\r
ConditionString = "Model=%s AND Enabled>=0" % Model\r
ValueString = "Value1,Value2,Value3,Scope1,ID,StartLine"\r
\r
- if Arch != None and Arch != 'COMMON':\r
+ if Arch is not None and Arch != 'COMMON':\r
ConditionString += " AND (Scope1='%s' OR Scope1='COMMON')" % Arch\r
\r
SqlCommand = "SELECT %s FROM %s WHERE %s" % (ValueString, self.Table, ConditionString)\r
ConditionString = "Model=%s AND Enabled>0" % Model\r
ValueString = "Value1,Value2,Value3,Scope1,Scope2,ID,StartLine"\r
\r
- if Scope1 != None and Scope1 != 'COMMON':\r
+ if Scope1 is not None and Scope1 != 'COMMON':\r
ConditionString += " AND (Scope1='%s' OR Scope1='COMMON')" % Scope1\r
- if Scope2 != None and Scope2 != 'COMMON':\r
+ if Scope2 is not None and Scope2 != 'COMMON':\r
ConditionString += " AND (Scope2='%s' OR Scope2='COMMON' OR Scope2='DEFAULT')" % Scope2\r
\r
- if BelongsToItem != None:\r
+ if BelongsToItem is not None:\r
ConditionString += " AND BelongsToItem=%s" % BelongsToItem\r
else:\r
ConditionString += " AND BelongsToItem<0"\r
\r
- if FromItem != None:\r
+ if FromItem is not None:\r
ConditionString += " AND FromItem=%s" % FromItem\r
\r
SqlCommand = "SELECT %s FROM %s WHERE %s" % (ValueString, self.Table, ConditionString)\r