summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Fayolle <alexandre.fayolle@logilab.fr>2009-12-14 15:06:01 +0100
committerAlexandre Fayolle <alexandre.fayolle@logilab.fr>2009-12-14 15:06:01 +0100
commita252b7db2c66ca371902a12f5c57bbda56045113 (patch)
tree95a61fea89f54361aaf6f5ff1e23d51c0e38c871
parent4a1f9990d58e202372a1d4406dfaad59b3d8ddb6 (diff)
downloadlogilab-common-a252b7db2c66ca371902a12f5c57bbda56045113.tar.gz
moved method so that it is closer to the related methods
-rw-r--r--adbh.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/adbh.py b/adbh.py
index 1382c48..df1f8c6 100644
--- a/adbh.py
+++ b/adbh.py
@@ -187,10 +187,6 @@ class _GenericAdvFuncHelper:
def sql_current_timestamp(self):
return 'CURRENT_TIMESTAMP'
- def sql_create_sequence(self, seq_name):
- return '''CREATE TABLE %s (last INTEGER);
-INSERT INTO %s VALUES (0);''' % (seq_name, seq_name)
-
def sql_create_index(self, table, column, unique=False):
idx = self._index_name(table, column, unique)
if unique:
@@ -205,6 +201,10 @@ INSERT INTO %s VALUES (0);''' % (seq_name, seq_name)
else:
return 'DROP INDEX %s' % idx
+ def sql_create_sequence(self, seq_name):
+ return '''CREATE TABLE %s (last INTEGER);
+INSERT INTO %s VALUES (0);''' % (seq_name, seq_name)
+
def sql_drop_sequence(self, seq_name):
return 'DROP TABLE %s;' % seq_name