如何在特定纪元时间后从 DynamoDB 获取项目

问题描述

我有一个接受纪元时间作为日期参数的函数。我想要在作为参数传递的日期之后来自数据库的所有数据。

在java 8,DynamoDB中是否有一些功能或有效的方法可以实现这一点?

public String getInfo(String fromDate,String id) {
        try {               
            Item documentItem = table.getItem(
                    new GetItemSpec().withPrimaryKey("id",id,"date",fromDate));
            if (documentItem != null) {
                LOG.info("DATA::"+documentItem.toJSONPretty());
                return documentItem.toJSONPretty();
            }
            throw new RuntimeException(String.format("errorrrr",id));
        } catch (Exception e) {
            LOG.error("Unable to get data from table");
        }
        return null;
    }   

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)