MCPcopy Create free account
hub / github.com/apitable/apitable / getNextChangeset

Method getNextChangeset

packages/core/src/engine/engine.ts:118–143  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

116 }
117
118 getNextChangeset(): ILocalChangeset | null {
119 const revision = this.getRevision();
120 if (revision == null) {
121 const error = new Error(t(Strings.error_revision_does_not_exist));
122 Player.doTrigger(Events.app_error_logger, {
123 error,
124 metaData: JSON.stringify({
125 resourceId: this.resourceId,
126 resourceType: this.resourceType,
127 engine: this,
128 resourceExist: Boolean(getResourcePack(this.getState(), this.resourceId, this.resourceType)),
129 }),
130 });
131 throw error;
132 }
133
134 this.bufferStorage.deOpBuffer(revision);
135
136 if (!this.bufferStorage.localPendingChangeset) {
137 return null;
138 }
139
140 this.latestSendTime = Date.now();
141
142 return this.bufferStorage.localPendingChangeset;
143 }
144
145 getLocalPendingChangeset() {
146 return this.bufferStorage.localPendingChangeset;

Callers 1

RoomServiceClass · 0.80

Calls 5

tFunction · 0.90
getResourcePackFunction · 0.90
stringifyMethod · 0.80
deOpBufferMethod · 0.80
getRevisionMethod · 0.45

Tested by

no test coverage detected