main
Last change
on this file was
42bd667,
checked in by David Fuertes <dfuertes@…>, 4 years ago
|
Historial Limpio
|
-
Property mode set to
100755
|
File size:
799 bytes
|
Line | |
---|
1 | from .base import SQLAdapter |
---|
2 | from . import adapters |
---|
3 | |
---|
4 | |
---|
5 | @adapters.register_for("teradata") |
---|
6 | class Teradata(SQLAdapter): |
---|
7 | dbengine = "" |
---|
8 | drivers = ("pyodbc",) |
---|
9 | |
---|
10 | def _initialize_(self): |
---|
11 | super(Teradata, self)._initialize_() |
---|
12 | self.ruri = self.uri.split("://", 1)[1] |
---|
13 | |
---|
14 | def connector(self): |
---|
15 | return self.driver.connect(self.ruri, **self.driver_args) |
---|
16 | |
---|
17 | def close(self): |
---|
18 | # Teradata does not implicitly close off the cursor |
---|
19 | # leading to SQL_ACTIVE_STATEMENTS limit errors |
---|
20 | self.cursor.close() |
---|
21 | super(Teradata, self).close() |
---|
22 | |
---|
23 | def lastrowid(self, table): |
---|
24 | # Teradata cannot retrieve the lastrowid for an IDENTITY Column |
---|
25 | # and they are not sequential anyway. |
---|
26 | # Similar to the NullCursor class, return 1 |
---|
27 | return 1 |
---|
Note: See
TracBrowser
for help on using the repository browser.