|
@@ -1567,8 +1567,13 @@ namespace InABox.Database.SQLite
|
|
|
{
|
|
|
if (attribute.Operator == FormulaOperator.None)
|
|
|
throw new Exception(string.Format("{0}.{1} is not a valid formula", columnname, attribute.Calculator.GetType().Name));
|
|
|
+
|
|
|
+ if (attribute.Operator == FormulaOperator.Constant)
|
|
|
+ return EscapeValue(attribute.Value);
|
|
|
+
|
|
|
if (!fieldmap.ContainsKey(attribute.Value))
|
|
|
throw new Exception(string.Format("{0}.{1} -> {2} does not exist", columnname, attribute.GetType().Name, attribute.Value));
|
|
|
+
|
|
|
foreach (var modifier in attribute.Modifiers)
|
|
|
if (!fieldmap.ContainsKey(modifier))
|
|
|
throw new Exception(string.Format("{0}.{1} -> {2} does not exist", columnname, attribute.GetType().Name, modifier));
|