summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkoljonen <koljonen@outlook.com>2016-06-16 13:41:54 +0200
committerkoljonen <koljonen@outlook.com>2016-06-16 13:41:54 +0200
commit53d7ada439ef77211cdda14222136a634c51b56d (patch)
tree441c3d06c2f887f9c415af1cdda41d7e9835fe9f
parent7ecf211302f8fd125f6cc52d5835a4c06dc0f17f (diff)
Add docstring to generate_alias method
-rw-r--r--pgcli/pgcompleter.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/pgcli/pgcompleter.py b/pgcli/pgcompleter.py
index 7980f10a..0ae6753e 100644
--- a/pgcli/pgcompleter.py
+++ b/pgcli/pgcompleter.py
@@ -386,6 +386,10 @@ class PGCompleter(Completer):
return self.find_matches(word_before_cursor, flat_cols, meta='column')
def generate_alias(self, tbl, tbls):
+ """ Generate a unique table alias
+ tbl - name of the table to alias, quoted if it needs to be
+ tbls - set of table refs already in use, normalized with normalize_ref
+ """
if tbl[0] == '"':
aliases = ('"' + tbl[1:-1] + str(i) + '"' for i in itertools.count(2))
else: