function getLogsNovedades() {
const getAllData = async (params) => {
const _getAllData = async (params, startKey) => {
if (startKey) {
params.ExclusiveStartKey = startKey
}
return dynamodb.query(params).promise();
}
let lastEvaluatedKey = null
let rows = []
do {
const result = await _getAllData(params, lastEvaluatedKey)
rows = rows.concat(result.Items)
lastEvaluatedKey = result.LastEvaluatedKey
} while (lastEvaluatedKey)
return rows
}
var params = {
TableName: tableName,
ProjectionExpression: "Id, #Type, #Data, IDPV, #Name, #Timestamp",
IndexName: 'Type-index',
KeyConditionExpression: '#Type = :tp',
ExpressionAttributeNames: {
'#Type': 'Type',
'#Data': 'Data',
'#Name': 'Name',
'#Timestamp': 'Timestamp'
},
ExpressionAttributeValues: {
':tp': 'NOVEDAD',
},
Limit: 100
};
return new Promise(async (resolve, reject) => {
try {
let Items = await getAllData(params);
resolve(Items);
} catch (err) {
reject(err);
}
});
}
How is generative AI increasing efficiency?
Join AWS GenAI LIVE! to find out how gen AI is reshaping productivity, streamlining processes, and driving innovation.
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)