diff options
Diffstat (limited to 'db.py')
-rw-r--r-- | db.py | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -462,13 +462,6 @@ class _PGAdvFuncHelper(_GenericAdvFuncHelper): cmds.append(' '.join(cmd)) return cmds -def dbcmd(cmd, dbhost, dbuser): - cmd = [cmd] - if dbhost: - cmd.append('--host=%s' % dbhost) - if dbuser: - cmd.append('--username=%s' % dbuser) - return cmd def sql_create_sequence(self, seq_name): return 'CREATE SEQUENCE %s;' % seq_name @@ -486,6 +479,14 @@ def dbcmd(cmd, dbhost, dbuser): return "CREATE TEMPORARY TABLE %s (%s) ON COMMIT DROP;" % (table_name, table_schema) +def dbcmd(cmd, dbhost, dbuser): + cmd = [cmd] + if dbhost: + cmd.append('--host=%s' % dbhost) + if dbuser: + cmd.append('--username=%s' % dbuser) + return cmd + class _SqliteAdvFuncHelper(_GenericAdvFuncHelper): """Generic helper, trying to provide generic way to implement specific functionnalities from others DBMS |