Skip to content

Commit 265ce07

Browse files
authored
support dateadd (#7)
1 parent f46fa29 commit 265ce07

File tree

5 files changed

+19
-54
lines changed

5 files changed

+19
-54
lines changed

dictum_backend_vertica/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.1.4"
1+
__version__ = "0.1.5"

dictum_backend_vertica/vertica_backend.py

+4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from dictum_core.backends.secret import Secret
44
from dictum_core.backends.sql_alchemy import SQLAlchemyBackend, SQLAlchemyCompiler
55
from sqlalchemy import Integer, cast
6+
from sqlalchemy.sql import func
67

78

89
class VerticaCompiler(SQLAlchemyCompiler):
@@ -31,6 +32,9 @@ def datediff(self, part, start, end):
3132
)
3233
return super().datediff(part, start, end)
3334

35+
def dateadd(self, part, interval, value):
36+
return func.timestampadd(part, interval, value)
37+
3438

3539
class VerticaBackend(SQLAlchemyBackend):
3640
type = "vertica"

poetry.lock

+12-51
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "dictum-backend-vertica"
3-
version = "0.1.4"
3+
version = "0.1.5"
44
description = "Vertica backend for Dictum"
55
authors = ["Mikhail Akimov"]
66

tests/test_dictum_backend_vertica.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010

1111
def test_version():
12-
assert __version__ == "0.1.4"
12+
assert __version__ == "0.1.5"
1313

1414

1515
def test_entry_point():

0 commit comments

Comments
 (0)