time - 将早于上一次交易的数据导入到 datomic 中

标签 time transactions datomic

我的理解正确吗?

http://docs.datomic.com/transactions.html

You can set :db/txInstant explicitly, overriding the transactor's clock time. When you do, you must choose a :db/txInstant value that is not older than any existing transaction, and not newer than the transactor's clock time. This capability enables initial imports of existing data

这是否意味着我无法将早于上一个事务的事实添加到 datomic 中,从而使查询能够正常工作?

这似乎是一个巨大的限制。与其他系统对接时该怎么办?例如,我可能会获取昨天的订单数据,但店员今天才有时间将其输入系统。如果今天有人输入任何事实,我将无法添加旧数据?

添加显式时间属性并在所有查询中使用它是唯一的选择吗?

最佳答案

不幸的是,当您有应用程序驱动的时间概念时,即您“现在”处理的某些事件发生的“记录”时间,您还需要应用程序驱动的查询机制。看看类似的thread在 Datomic 谷歌小组中。

所以答案是肯定的,您必须明确处理“记录”的时间。

关于time - 将早于上一次交易的数据导入到 datomic 中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19059659/

相关文章:

perl - 将旧的 Unix 日期转换为 Perl 并进行比较

mysql - 在 MySQLWorkbench 中使用事务执行存储过程总是自动提交?

java - kundera-cassandra 中的交易

clojure - Datomic 和 HornetQException "unable to validate user"

clojure - 高效的 Datomic 查询对分页集执行过滤

android - 如何在android中像时间轴一样转换日期和时间?

Oracle 相当于 java System.currentTimeMillis()?

ruby-on-rails - 在 Rails 中,用英文显示两个日期之间的时间

事务、锁、隔离级别

recursion - Datomic 的递归数据日志查询真的很慢