Skip to content

Commit

Permalink
fix(queries): comment out version check
Browse files Browse the repository at this point in the history
  • Loading branch information
parkererickson-tg committed Apr 26, 2024
1 parent a3b6ba4 commit 8fde988
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions pyTigerGraph/pyTigerGraphQuery.py
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,13 @@ def describeQuery(self, queryName: str, queryDescription: str, parameterDescript
The response from the database.
"""
logger.info("entry: describeQuery")
'''
self.ver = self.getVer()
major_ver, minor_ver, patch_ver = self.ver.split(".")
if int(major_ver) < 4:
logger.info("exit: describeQuery")
raise TigerGraphException("This function is only supported on versions of TigerGraph >= 4.0.0.", 0)
'''

if parameterDescriptions:
params = {"queries": [
Expand Down Expand Up @@ -642,6 +649,13 @@ def getQueryDescription(self, queryName: Optional[Union[str, list]] = "all"):
The description of the query(ies).
"""
logger.info("entry: getQueryDescription")
'''
self.ver = self.getVer()
major_ver, minor_ver, patch_ver = self.ver.split(".")
if int(major_ver) < 4:
logger.info("exit: getQueryDescription")
raise TigerGraphException("This function is only supported on versions of TigerGraph >= 4.0.0.", 0)
'''

if logger.level == logging.DEBUG:
logger.debug("params: " + self._locals(locals()))
Expand Down Expand Up @@ -671,14 +685,19 @@ def dropQueryDescription(self, queryName: str, dropParamDescriptions: bool = Tru
The response from the database.
"""
logger.info("entry: dropQueryDescription")

'''
self.ver = self.getVer()
major_ver, minor_ver, patch_ver = self.ver.split(".")
if int(major_ver) < 4:
logger.info("exit: describeQuery")
raise TigerGraphException("This function is only supported on versions of TigerGraph >= 4.0.0.", 0)
'''
if logger.level == logging.DEBUG:
logger.debug("params: " + self._locals(locals()))
if dropParamDescriptions:
params = {"queries": [queryName], "queryParameters": [queryName+".*"]}
else:
params = {"queries": [queryName]}
print(params)
res = self._delete(self.gsUrl+"/gsqlserver/gsql/description?graph="+self.graphname, authMode="pwd", data=params, jsonData=True)

if logger.level == logging.DEBUG:
Expand Down

0 comments on commit 8fde988

Please sign in to comment.