Skip to content
This repository was archived by the owner on Feb 21, 2020. It is now read-only.

Commit 26f7fa5

Browse files
Merge pull request #31 from jordiyeh/jordiyeh-patch-30
Allows UPDATE statement to work and installs optional vertica python dependencies
2 parents 1bec933 + 4835a08 commit 26f7fa5

3 files changed

Lines changed: 19 additions & 2 deletions

File tree

README.rst

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,18 @@ From git: ::
2121

2222
git clone https://github.com/LocusEnergy/vertica-sqlalchemy
2323
cd vertica-sqlalchemy
24-
python setup.py install
24+
python setup.py install
25+
26+
27+
Usage
28+
------------
29+
30+
**ID/Primary Key Declaration**
31+
32+
Do not use this. The INSERT will fail as it will try to insert the ID
33+
34+
id = Column(Integer, primary_key=True)
35+
36+
Do the following instead
37+
38+
id = Column(Integer, Sequence('user_id_seq'), primary_key=True)

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
vertica.vertica_python = sqla_vertica_python.vertica_python:VerticaDialect
2020
""",
2121
install_requires=[
22-
'vertica_python'
22+
'vertica_python[namedparams]'
2323
],
2424
)
2525

sqla_vertica_python/vertica_python.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ class VerticaDialect(PGDialect):
2121
name = 'vertica'
2222
driver = 'vertica_python'
2323

24+
# UPDATE functionality works with the following option set to False
25+
supports_sane_rowcount = False
26+
2427
supports_unicode_statements = True
2528
supports_unicode_binds = True
2629
supports_native_decimal = True

0 commit comments

Comments
 (0)