Skip to content

Commit

Permalink
fix params order
Browse files Browse the repository at this point in the history
  • Loading branch information
ea-rus committed Apr 15, 2024
1 parent a06c9ea commit ad288c2
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions mindsdb_sql/parser/dialects/mindsdb/knowledge_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,19 @@ def to_tree(self, *args, level=0, **kwargs):
return out_str

def get_string(self, *args, **kwargs):
params = self.params.copy()
using_ar = [f"{k}={repr(v)}" for k, v in params.items()]
from_query_str = (
f"FROM ({self.from_query.get_string()})" if self.from_query else ""
)

using_ar = []
if self.storage:
using_ar.append(f" STORAGE = {self.storage.to_string()}")
using_ar.append(f" STORAGE={self.storage.to_string()}")
if self.model:
using_ar.append(f" MODEL = {self.model.to_string()}")
using_ar.append(f" MODEL={self.model.to_string()}")

params = self.params.copy()
if params:
using_ar += [f"{k}={repr(v)}" for k, v in params.items()]
if using_ar:
using_str = "USING " + ", ".join(using_ar)
else:
Expand Down

0 comments on commit ad288c2

Please sign in to comment.