我怎样才能使用撤消 |重做还是在 google 云 Firestore 中?
How can I use undo | redo or in google cloud firestore?
我正在尝试将应用程序从 Google Realtime 迁移到 Google Cloud Firestore,原因如下。
Important dates to note
As of November 28, 2017, Realtime API is no longer available for new
projects. Google API Console projects which accessed Realtime API
prior to November 28, 2017 (including your projects listed above) will
continue to function normally until December 11, 2018.
On December 11, 2018, Realtime API documents will be made read-only,
and attempts to modify document contents using the API will fail.
On January 15, 2019, Realtime API will be shut down, but an endpoint
to export document contents will remain available.
实时API 支持文档的版本控制。
https://developers.google.com/google-apps/realtime/migration
function retrieveRealtimeJson(docId, revision) {
gapi.client.drive.realtime.get({
'fileId': docId,
'revision': revision // =====> can get previous version of doc
}).then(function(response) {
return response.data;
});
return null;
}
实时 API 还支持撤消和重做。
https://developers.google.com/google-apps/realtime/undo
if (model.canUndo) {
model.undo();
} else {
console.log("No events to undo.");
}
撤消和重做或获取修订版在Google Cloud Firestore中是否有等效的功能?
Cloud Firestore 没有 built-in 文档版本控制。
如果您的 use-case 需要版本控制,您必须自己在 Firestore API 之上构建它。
例如,您可以将版本化内容作为每个文档的子集合,这样每个版本都是子集合中的单独文档:/documents/document1/versions/1
、/documents/document1/versions/2
等
我正在尝试将应用程序从 Google Realtime 迁移到 Google Cloud Firestore,原因如下。
Important dates to note
As of November 28, 2017, Realtime API is no longer available for new projects. Google API Console projects which accessed Realtime API prior to November 28, 2017 (including your projects listed above) will continue to function normally until December 11, 2018.
On December 11, 2018, Realtime API documents will be made read-only, and attempts to modify document contents using the API will fail.
On January 15, 2019, Realtime API will be shut down, but an endpoint to export document contents will remain available.
实时API 支持文档的版本控制。 https://developers.google.com/google-apps/realtime/migration
function retrieveRealtimeJson(docId, revision) {
gapi.client.drive.realtime.get({
'fileId': docId,
'revision': revision // =====> can get previous version of doc
}).then(function(response) {
return response.data;
});
return null;
}
实时 API 还支持撤消和重做。 https://developers.google.com/google-apps/realtime/undo
if (model.canUndo) {
model.undo();
} else {
console.log("No events to undo.");
}
撤消和重做或获取修订版在Google Cloud Firestore中是否有等效的功能?
Cloud Firestore 没有 built-in 文档版本控制。
如果您的 use-case 需要版本控制,您必须自己在 Firestore API 之上构建它。
例如,您可以将版本化内容作为每个文档的子集合,这样每个版本都是子集合中的单独文档:/documents/document1/versions/1
、/documents/document1/versions/2
等