|
@ -45,6 +45,7 @@ class Testserver(): |
|
|
Testserver.__instance = self |
|
|
Testserver.__instance = self |
|
|
for s in B.LIST_SUBJECTS: |
|
|
for s in B.LIST_SUBJECTS: |
|
|
self.model[tools.data_tool.getSingularKeyword(s)] = model.factory.get_entity_object(job, s, {}) |
|
|
self.model[tools.data_tool.getSingularKeyword(s)] = model.factory.get_entity_object(job, s, {}) |
|
|
|
|
|
pass |
|
|
|
|
|
|
|
|
@staticmethod |
|
|
@staticmethod |
|
|
def getInstance(job): |
|
|
def getInstance(job): |
|
@ -140,15 +141,17 @@ class Testserver(): |
|
|
except Exception as e: |
|
|
except Exception as e: |
|
|
raise Exception("Fehler bei createSchema "+s) |
|
|
raise Exception("Fehler bei createSchema "+s) |
|
|
|
|
|
|
|
|
def createDBTable(self, job, project, compname, tablename): |
|
|
def createDBTable(self, job, project, context, tablename): |
|
|
""" |
|
|
""" |
|
|
creates a table in the database |
|
|
creates a table in the database |
|
|
:param job: |
|
|
:param job: |
|
|
:return: |
|
|
:return: |
|
|
""" |
|
|
""" |
|
|
|
|
|
args = {} |
|
|
|
|
|
args["context"] = context |
|
|
table = model.table.Table(job) |
|
|
table = model.table.Table(job) |
|
|
table = table.read_entity(job, tablename) |
|
|
table = table.read_entity(job, tablename, args=args) |
|
|
sql = table.get_schema(project=project, tableName=tablename, tableObject=table) # [B.DATA_NODE_TABLES][m[:-4]] |
|
|
sql = table.get_schema(tablename) # [B.DATA_NODE_TABLES][m[:-4]] |
|
|
job.m.logInfo(sql) |
|
|
job.m.logInfo(sql) |
|
|
for s in sql.split(";\n"): |
|
|
for s in sql.split(";\n"): |
|
|
if len(s) < 3: |
|
|
if len(s) < 3: |
|
|