Пример #1
0
def __getTables():
    if (MANUAL_ENGINE_POSTGRES != None):
        sqlRequest = "SELECT table_schema, table_name FROM information_schema.tables where table_schema like '%%alesforce' ORDER BY table_schema,table_name"
        result = MANUAL_ENGINE_POSTGRES.execute(sqlRequest)
        return utils.__resultToDict(result)

    return {'data': [], "columns": []}
Пример #2
0
def __getObjects(tableName):
    if (MANUAL_ENGINE_POSTGRES != None):
        concat = SALESFORCE_SCHEMA + "." + tableName
        result = MANUAL_ENGINE_POSTGRES.execute(
            "select * from {}".format(concat))
        return utils.__resultToDict(result)

    return {'data': [], "columns": []}
Пример #3
0
def __execRequest(strReq, Attributes):
    if (MANUAL_ENGINE_POSTGRES != None):
        result = MANUAL_ENGINE_POSTGRES.execute(strReq, Attributes)
        return utils.__resultToDict(result)
    return {'data': [], "columns": []}