def generateSqlCountTable(queryData: dict) -> str: queryData['businessDbId'] = queryData['account'] queryData['dbTableName'] = queryData['dbTableName'].format(**queryData) queryData['dbTableNameIdentifier'] = sql.Identifier( queryData['dbTableName']) queryData = IdbGenericSqlQueryBuilder.generateSqlGenericTableCondition( queryData) return IdbGenericSqlQueryBuilder.generateSqlCountAllItems(queryData)
def generateSqlGetBusinessPackage(queryData: dict) -> str: if 'businessId' in queryData: queryData['dbTablePk'] = sql.Literal(queryData['businessId']) return IdbGenericSqlQueryBuilder.generateSqlGenericGetItem(queryData)
def generateSqlDeleteActionCost(queryData: dict) -> str: if 'id' in queryData and isinstance(queryData['id'], int): queryData['dbTablePk'] = sql.SQL(str(queryData['id'])) return IdbGenericSqlQueryBuilder.generateSqlGenericDeleteItem(queryData)
def generateSqlAddActionCost(queryData: dict) -> str: return IdbGenericSqlQueryBuilder.generateSqlGenericPutItem(queryData)
def generateSqlFindActionsCosts(queryData: dict) -> str: return IdbGenericSqlQueryBuilder.generateSqlGenericFindItems(queryData)
def generateSqlFindTable(queryData: dict) -> str: return IdbGenericSqlQueryBuilder.generateSqlGenericFindItems(queryData)
def generateSqlUpdatePackage(queryData: dict) -> str: if 'pid' in queryData and isinstance(queryData['pid'], int): queryData['dbTablePk'] = sql.SQL(str(queryData['pid'])) return IdbGenericSqlQueryBuilder.generateSqlGenericUpdateItem(queryData)
def generateSqlUpdateBusinessPackageItem(queryData: dict) -> str: return IdbGenericSqlQueryBuilder.generateSqlGenericUpdateItem(queryData)
def generateSqlCreatePackage(queryData: dict) -> str: return IdbGenericSqlQueryBuilder.generateSqlGenericPutItem(queryData)
def generateSqlGetPackages(queryData: dict) -> str: return IdbGenericSqlQueryBuilder.generateSqlGenericFindItems(queryData)
def generateSqlAddBusiness(queryData: dict) -> str: return IdbGenericSqlQueryBuilder.generateSqlGenericPutItem(queryData)
def generateSqlLogBillingAudit(queryData: dict) -> str: return IdbGenericSqlQueryBuilder.generateSqlGenericPutItem(queryData)
def generateSqlLogPayment(queryData: dict) -> str: return IdbGenericSqlQueryBuilder.generateSqlGenericPutItem(queryData)
def generateSqlDeleteItemsByObjectId(queryData: dict) -> str: queryData['dbTableColumnPk'] = "oid" if 'oid' in queryData and isinstance(queryData['oid'], str): queryData['dbTablePk'] = sql.Literal(queryData['oid']) return IdbGenericSqlQueryBuilder.generateSqlGenericDeleteItem( queryData)
def generateSqlGetObject(queryData: dict) -> str: queryData['dbTableColumnPk'] = "oid" queryData['account'] = "idbobjects" if 'objectId' in queryData and isinstance(queryData['objectId'], str): queryData['dbTablePk'] = sql.Literal(queryData['objectId']) return IdbGenericSqlQueryBuilder.generateSqlGenericGetItem(queryData)
def generateSqlCreateObject(queryData: dict) -> str: queryData['dbTableColumnPk'] = "oid" queryData['account'] = "idbobjects" return IdbGenericSqlQueryBuilder.generateSqlGenericPutItem(queryData)