fix bugs
[plcapi.git] / PLC / Parameter.py
index ad72106..14a8b18 100644 (file)
@@ -4,9 +4,6 @@
 # Mark Huang <mlhuang@cs.princeton.edu>
 # Copyright (C) 2006 The Trustees of Princeton University
 #
-# $Id$
-# $URL$
-#
 
 from types import *
 from PLC.Faults import *
@@ -22,7 +19,10 @@ class Parameter:
                  min = None, max = None,
                  optional = None,
                  ro = False,
-                 nullok = False):
+                 nullok = False, 
+                 primary_key = False, 
+                 indexed = False,
+                 joined=False):
         # Basic type of the parameter. Must be a builtin type
         # that can be marshalled by XML-RPC.
         self.type = typeval
@@ -46,6 +46,14 @@ class Parameter:
         # Whether the DB field can be NULL.
         self.nullok = nullok
 
+        self.primary_key = primary_key
+
+        # Whether the DB field is indexed
+        self.indexed = indexed
+        
+        # Whether the DB field lives in another table  
+        self.joined = joined
+
     def type(self):
         return self.type
 
@@ -61,7 +69,6 @@ class Mixed(tuple):
     def __new__(cls, *types):
         return tuple.__new__(cls, types)
 
-
 def python_type(arg):
     """
     Returns the Python type of the specified argument, which may be a