From 1885e3a5f64ce659d3ab56e85c8e1fea52ed5605 Mon Sep 17 00:00:00 2001 From: Steve Nyemba Date: Sun, 9 Jul 2023 17:51:09 -0500 Subject: [PATCH] bug fix, making table when provided a schema --- transport/sql.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transport/sql.py b/transport/sql.py index bf34c76..a4a66c8 100644 --- a/transport/sql.py +++ b/transport/sql.py @@ -129,7 +129,7 @@ class SQLRW : return self.schema +'.'+name if self.schema not in [None, ''] and '.' not in name else name def has(self,**_args): - return self.meta(**_args) + return len(self.meta(**_args)) > 0 # found = False # try: @@ -305,7 +305,7 @@ class SQLWriter(SQLRW,Writer): if 'schema' in _args : if type(_args['schema']) == str : self.schema = _args['schema'] if 'schema' in _args else self.schema - elif type(_args['schema']) == list: + elif type(_args['schema']) == list and not self.has(table): self.make(table=table,schema=_args['schema']) pass # self.schema = _args['schema'] if 'schema' in _args else self.schema