有没有办法防止 RethinkDB 自动生成的 ID 字段中出现连字符?
Is there a way to prevent hyphens in RethinkDB auto generated ID field?
在使用 Feathers JS POSTing 数据时,有什么方法可以防止 RethinkDB 自动生成带连字符的 ID?现在,当我 POST 一大块 JSON 数据通过我的 FeathersJS 进入 RethinkDB 时,Rethink 正在使用 hyphens/dashes(-) 自动创建 ID 字段。有我禁用它的配置吗?或者我需要手动提供 ID 字段?
RethinkDB 使用 UUIDs as the primary keys and does not allow to change that behaviour. From (在 RethinkDB 中要求自动递增字段 ID):
No, RethinkDB doesn't support it. The reason is because of its distribution. It's hard to have an auto increment number on such that environment because you have to check on multiple machines for next incremental value.
In RethinkDB, UUID guarantees the uniqueness, especially in the case of primary key.
在使用 Feathers JS POSTing 数据时,有什么方法可以防止 RethinkDB 自动生成带连字符的 ID?现在,当我 POST 一大块 JSON 数据通过我的 FeathersJS 进入 RethinkDB 时,Rethink 正在使用 hyphens/dashes(-) 自动创建 ID 字段。有我禁用它的配置吗?或者我需要手动提供 ID 字段?
RethinkDB 使用 UUIDs as the primary keys and does not allow to change that behaviour. From
No, RethinkDB doesn't support it. The reason is because of its distribution. It's hard to have an auto increment number on such that environment because you have to check on multiple machines for next incremental value.
In RethinkDB, UUID guarantees the uniqueness, especially in the case of primary key.