From e29f6f2861b271bd04192d064ddc9411e553164d Mon Sep 17 00:00:00 2001 From: Andy Eschbacher Date: Tue, 6 Sep 2016 09:23:39 -0400 Subject: [PATCH] add more comments --- src/py/crankshaft/crankshaft/pysal_utils/pysal_utils.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/py/crankshaft/crankshaft/pysal_utils/pysal_utils.py b/src/py/crankshaft/crankshaft/pysal_utils/pysal_utils.py index a588795..f0c73ba 100644 --- a/src/py/crankshaft/crankshaft/pysal_utils/pysal_utils.py +++ b/src/py/crankshaft/crankshaft/pysal_utils/pysal_utils.py @@ -44,6 +44,13 @@ def query_attr_select(params): Create portion of SELECT statement for attributes inolved in query. @param params: dict of information used in query (column names, table name, etc.) + Example: + OrderedDict([('attr1', 'numerator'), + ('attr2', 'denominator'), + ('subquery', 'SELECT * FROM interesting_data')]) + Output: + "i.\"numerator\"::numeric As attr1, " \ + "i.\"denominator\"::numeric As attr2, " """ attr_string = ""