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