Skip to content

Commit

Permalink
fix: fix for sqlalchemy warning (#135)
Browse files Browse the repository at this point in the history
* fix: fix for sqlalchemy warning

* fix test

* create log dir on TDengine startup

* change log dir and data dir for mac

* fix for mac
  • Loading branch information
sunpe authored Feb 27, 2023
1 parent 297e0a3 commit 1d852ab
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,13 @@ jobs:
run: |
export C_INCLUDE_PATH=$PWD/TDengine/build/build/include
export LD_LIBRARY_PATH=$PWD/TDengine/build/build/lib
taosadapter &
mkdir -p /tmp/taos/v3/log /tmp/taos/v3/data
printf "dataDir /tmp/taos/v3/data\nlogDir /tmp/taos/v3/log\ndebugFlag 135\n" |sudo tee /etc/taos/taos.cfg
TAOS_SUPPORT_VNODES=256 taosd &
taosadapter &
sleep 1
- name: Cache Poetry
Expand Down
11 changes: 11 additions & 0 deletions taos/sqlalchemy.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class TaosWsDialect(default.DefaultDialect):
driver = "taosws"
supports_native_boolean = True
implicit_returning = True
supports_statement_cache = True

def do_rollback(self, connection):
pass
Expand All @@ -39,6 +40,11 @@ def dbapi(cls):

return taosws

@classmethod
def import_dbapi(cls):
import taosws
return taosws

def has_schema(self, connection, schema):
return False

Expand Down Expand Up @@ -87,6 +93,7 @@ class TaosDialect(default.DefaultDialect):
driver = "taos"
supports_native_boolean = True
implicit_returning = True
supports_statement_cache = True

def do_rollback(self, connection):
pass
Expand All @@ -98,6 +105,10 @@ def _get_server_version_info(self, connection):
def dbapi(cls):
return AlchemyTaosConnection()

@classmethod
def import_dbapi(cls):
return AlchemyTaosConnection()

def has_schema(self, connection, schema):
return False

Expand Down
5 changes: 5 additions & 0 deletions taosrest/sqlalchemy.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class TaosRestDialect(default.DefaultDialect):
driver = "taosrest"
supports_native_boolean = True
implicit_returning = True
supports_statement_cache = True

def do_rollback(self, connection):
pass
Expand All @@ -44,6 +45,10 @@ def _get_server_version_info(self, connection):
def dbapi(cls):
return AlchemyRestConnection()

@classmethod
def import_dbapi(cls):
return AlchemyRestConnection()

def has_schema(self, connection, schema):
return False

Expand Down

0 comments on commit 1d852ab

Please sign in to comment.