[storm] Thanks, and questions: SQL reserved keywords; "interface-driven" apps

Stephen Waterbury waterbug at pangalactic.us
Sun Jan 20 11:54:28 GMT 2008

Sorry to reply to my own message, but I couldn't wait ...
now I'm even more impressed with your code:  it appears
that I only need to change one line to get my
underscore-prefixed mapping!
--- expr.py     2008-01-20 03:37:00.000000000 -0500
+++ expr-new.py 2008-01-20 03:37:26.000000000 -0500
@@ -721,7 +721,7 @@

      def __init__(self, name=Undef, table=Undef, primary=False,
-        self.name = name
+        self.name = '_'+name
          self.table = table
          self.primary = int(primary)
          self.variable_factory = variable_factory or Variable

Of course, the other thing required is to assign my app's 
underscore-prefixed table name to the '__storm_table__' class
attribute for my app classes, but that's not a code change for
Storm (excellent design, again!).

I haven't fully tested this yet, but it works so far in my
experiments with Storm-tutorial-like cases using my application's
objects and the corresponding generated tables.


More information about the storm mailing list