From 37875dea78f1dc079efa58bd094cbd41af7c1b6b Mon Sep 17 00:00:00 2001 From: ttyS15 Date: Thu, 1 Dec 2016 18:11:56 +0300 Subject: [PATCH 1/4] =?UTF-8?q?DSHB-1657=20'using'=20are=20used=20in=20SQL?= =?UTF-8?q?=D0=A1ompiler?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vertica/compiler.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/vertica/compiler.py b/vertica/compiler.py index eb9f35d..71e526b 100644 --- a/vertica/compiler.py +++ b/vertica/compiler.py @@ -12,15 +12,15 @@ class SQLInsertCompiler(SQLInsertCompiler): - # We'll need to rollback insert sql if validate_constarints raises an - # IntegrityError. So atomic decorator is necessary. - @atomic def execute_sql(self, return_id=False): - result = super(SQLInsertCompiler, self).execute_sql(return_id) + # We'll need to rollback insert sql if validate_constarints raises an + # IntegrityError. So atomic decorator is necessary. + with atomic(using=self.using): + result = super(SQLInsertCompiler, self).execute_sql(return_id) - if ENFORCE_CONSTRAINTS_VALIDATION: - self.connection.ops.validate_constraints( - self.connection.cursor(), - self.query.get_meta().db_table) + if ENFORCE_CONSTRAINTS_VALIDATION: + self.connection.ops.validate_constraints( + self.connection.cursor(), + self.query.get_meta().db_table) - return result \ No newline at end of file + return result \ No newline at end of file From ae17534e91be046f6a81d113737f0f0ab4673835 Mon Sep 17 00:00:00 2001 From: ttyS15 Date: Thu, 1 Dec 2016 18:20:27 +0300 Subject: [PATCH 2/4] =?UTF-8?q?DSHB-1657=20'using'=20are=20used=20in=20SQL?= =?UTF-8?q?=D0=A1ompiler?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .travis.yml | 4 ++-- vertica/compiler.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 286a924..65f49b3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,8 +8,8 @@ env: # command to install dependencies install: - - pip install -r requires.txt --use-mirrors - - pip install Django==$DJANGO_VERSION --use-mirrors + - pip install -r requires.txt + - pip install Django==$DJANGO_VERSION # command to run tests script: python manage.py test test_app diff --git a/vertica/compiler.py b/vertica/compiler.py index 71e526b..916a443 100644 --- a/vertica/compiler.py +++ b/vertica/compiler.py @@ -14,7 +14,7 @@ class SQLInsertCompiler(SQLInsertCompiler): def execute_sql(self, return_id=False): # We'll need to rollback insert sql if validate_constarints raises an - # IntegrityError. So atomic decorator is necessary. + # IntegrityError. So atomic is necessary. with atomic(using=self.using): result = super(SQLInsertCompiler, self).execute_sql(return_id) From cdf2b7dd88f497880d23033b3945ebf910294443 Mon Sep 17 00:00:00 2001 From: ttyS15 Date: Thu, 1 Dec 2016 18:40:49 +0300 Subject: [PATCH 3/4] =?UTF-8?q?DSHB-1657=20'using'=20are=20used=20in=20SQL?= =?UTF-8?q?=D0=A1ompiler?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- requires.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requires.txt b/requires.txt index b68c706..4d9115a 100644 --- a/requires.txt +++ b/requires.txt @@ -1 +1 @@ -vertica-python +https://github.com/rutube/vertica-python/archive/master.zip From ab15edd474fafbf4c53a3ebc6d71acff5711d1fc Mon Sep 17 00:00:00 2001 From: ttyS15 Date: Thu, 1 Dec 2016 18:59:55 +0300 Subject: [PATCH 4/4] =?UTF-8?q?DSHB-1657=20'using'=20are=20used=20in=20SQL?= =?UTF-8?q?=D0=A1ompiler?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- requires.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requires.txt b/requires.txt index 4d9115a..72598d9 100644 --- a/requires.txt +++ b/requires.txt @@ -1 +1 @@ -https://github.com/rutube/vertica-python/archive/master.zip +vertica-python==0.3.0