dabo Commit
Revision 4498
Date: 2008-09-01 16:19:25 -0700 (Mon, 01 Sep 2008)
Author: Ed
Trac: http://svn.dabodev.com/trac/dabo/changeset/4498

Changed:
U   trunk/dabo/biz/dBizobj.py

Log:
Deprecated the SQL property. It now issues a deprecation warning, and then 
passes the values through to the UserSQL prop.


Diff:
Modified: trunk/dabo/biz/dBizobj.py
===================================================================
--- trunk/dabo/biz/dBizobj.py   2008-09-01 18:36:01 UTC (rev 4497)
+++ trunk/dabo/biz/dBizobj.py   2008-09-01 23:19:25 UTC (rev 4498)
@@ -1,6 +1,7 @@
 # -*- coding: utf-8 -*-
 import types
 import re
+import warnings
 import dabo
 import dabo.dConstants as kons
 from dabo.db.dCursorMixin import dCursorMixin
@@ -12,6 +13,7 @@
 NO_RECORDS_PK = "75426755-2f32-4d3d-86b6-9e2a1ec47f2c"  ## Can't use None
 
 
+
 class dBizobj(dObject):
        """ The middle tier, where the business logic resides."""
        # Class to instantiate for the cursor object
@@ -1995,13 +1997,14 @@
 
 
        def _getSQL(self):
-               try:
-                       return self._SQL
-               except AttributeError:
-                       return ""
+               warnings.warn(_("""This property is deprecated, and will be 
removed in the next version
+of the framework. Use the 'UserSQL' property instead."""), DeprecationWarning, 
1)
+               return self.UserSQL
 
        def _setSQL(self, val):
-               self._SQL = val
+               warnings.warn(_("""This property is deprecated, and will be 
removed in the next version
+of the framework. Use the 'UserSQL' property instead."""), DeprecationWarning, 
1)
+               self.UserSQL = val
 
 
        def _getSqlMgr(self):
@@ -2151,7 +2154,7 @@
                        _("""Do we scan the records in reverse order? (Default: 
False) (bool)"""))
 
        SQL = property(_getSQL, _setSQL, None,
-                       _("SQL statement used to create the cursor's data. 
(str)"))
+                       _("DEPRECATED. Equivalent to UserSQL. (str)"))
 
        SqlManager = property(_getSqlMgr, None, None,
                        _("Reference to the cursor that handles SQL Builder 
information (cursor)") )
@@ -2217,4 +2220,3 @@
        def __iter__(self):
                self.__firstpass = True
                return self
-




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]

Reply via email to