envio 2.29.0-alpha.2 → 2.29.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -180,39 +180,36 @@ function fromTable(table, schema) {
180
180
  }
181
181
  var field$1 = field._0;
182
182
  var match = field$1.fieldName;
183
- switch (match) {
184
- case "db_write_timestamp" :
185
- return ;
186
- case "id" :
187
- return {
188
- TAG: "Field",
189
- _0: {
190
- fieldName: id,
191
- fieldType: field$1.fieldType,
192
- fieldSchema: field$1.fieldSchema,
193
- isArray: field$1.isArray,
194
- isNullable: field$1.isNullable,
195
- isPrimaryKey: true,
196
- isIndex: field$1.isIndex,
197
- linkedEntity: field$1.linkedEntity,
198
- defaultValue: field$1.defaultValue
199
- }
200
- };
201
- default:
202
- return {
203
- TAG: "Field",
204
- _0: {
205
- fieldName: field$1.fieldName,
206
- fieldType: field$1.fieldType,
207
- fieldSchema: field$1.fieldSchema,
208
- isArray: field$1.isArray,
209
- isNullable: true,
210
- isPrimaryKey: field$1.isPrimaryKey,
211
- isIndex: false,
212
- linkedEntity: field$1.linkedEntity,
213
- defaultValue: field$1.defaultValue
214
- }
215
- };
183
+ if (match === "id") {
184
+ return {
185
+ TAG: "Field",
186
+ _0: {
187
+ fieldName: id,
188
+ fieldType: field$1.fieldType,
189
+ fieldSchema: field$1.fieldSchema,
190
+ isArray: field$1.isArray,
191
+ isNullable: field$1.isNullable,
192
+ isPrimaryKey: true,
193
+ isIndex: field$1.isIndex,
194
+ linkedEntity: field$1.linkedEntity,
195
+ defaultValue: field$1.defaultValue
196
+ }
197
+ };
198
+ } else {
199
+ return {
200
+ TAG: "Field",
201
+ _0: {
202
+ fieldName: field$1.fieldName,
203
+ fieldType: field$1.fieldType,
204
+ fieldSchema: field$1.fieldSchema,
205
+ isArray: field$1.isArray,
206
+ isNullable: true,
207
+ isPrimaryKey: field$1.isPrimaryKey,
208
+ isIndex: false,
209
+ linkedEntity: field$1.linkedEntity,
210
+ defaultValue: field$1.defaultValue
211
+ }
212
+ };
216
213
  }
217
214
  }));
218
215
  var actionFieldName = "action";
@@ -339,12 +339,6 @@ module RawEvents = {
339
339
  mkField("block_fields", JsonB, ~fieldSchema=S.json(~validate=false)),
340
340
  mkField("transaction_fields", JsonB, ~fieldSchema=S.json(~validate=false)),
341
341
  mkField("params", JsonB, ~fieldSchema=S.json(~validate=false)),
342
- mkField(
343
- "db_write_timestamp",
344
- TimestampWithoutTimezone,
345
- ~default="CURRENT_TIMESTAMP",
346
- ~fieldSchema=S.int,
347
- ),
348
342
  mkField("serial", Serial, ~isNullable, ~isPrimaryKey, ~fieldSchema=S.null(S.int)),
349
343
  ],
350
344
  )
@@ -218,7 +218,6 @@ var table$3 = Table.mkTable("raw_events", undefined, [
218
218
  Table.mkField("block_fields", "JSONB", S$RescriptSchema.json(false), undefined, undefined, undefined, undefined, undefined, undefined),
219
219
  Table.mkField("transaction_fields", "JSONB", S$RescriptSchema.json(false), undefined, undefined, undefined, undefined, undefined, undefined),
220
220
  Table.mkField("params", "JSONB", S$RescriptSchema.json(false), undefined, undefined, undefined, undefined, undefined, undefined),
221
- Table.mkField("db_write_timestamp", "TIMESTAMP", S$RescriptSchema.$$int, "CURRENT_TIMESTAMP", undefined, undefined, undefined, undefined, undefined),
222
221
  Table.mkField("serial", "SERIAL", S$RescriptSchema.$$null(S$RescriptSchema.$$int), undefined, undefined, true, true, undefined, undefined)
223
222
  ]);
224
223
 
@@ -96,7 +96,6 @@ let fetchNext = async (
96
96
  ~executeQuery,
97
97
  ~waitForNewBlock,
98
98
  ~onNewBlock,
99
- ~targetBufferSize,
100
99
  ~stateId,
101
100
  ) => {
102
101
  let {maxPartitionConcurrency} = sourceManager
@@ -105,7 +104,6 @@ let fetchNext = async (
105
104
  ~concurrencyLimit={
106
105
  maxPartitionConcurrency - sourceManager.fetchingPartitionsCount
107
106
  },
108
- ~targetBufferSize,
109
107
  ~currentBlockHeight,
110
108
  ~stateId,
111
109
  ) {
@@ -69,8 +69,8 @@ function trackNewStatus(sourceManager, newStatus) {
69
69
  sourceManager.status = newStatus;
70
70
  }
71
71
 
72
- async function fetchNext(sourceManager, fetchState, currentBlockHeight, executeQuery, waitForNewBlock, onNewBlock, targetBufferSize, stateId) {
73
- var queries = FetchState.getNextQuery(fetchState, sourceManager.maxPartitionConcurrency - sourceManager.fetchingPartitionsCount | 0, targetBufferSize, currentBlockHeight, stateId);
72
+ async function fetchNext(sourceManager, fetchState, currentBlockHeight, executeQuery, waitForNewBlock, onNewBlock, stateId) {
73
+ var queries = FetchState.getNextQuery(fetchState, sourceManager.maxPartitionConcurrency - sourceManager.fetchingPartitionsCount | 0, currentBlockHeight, stateId);
74
74
  if (typeof queries !== "object") {
75
75
  switch (queries) {
76
76
  case "WaitingForNewBlock" :
@@ -17,7 +17,6 @@ let fetchNext: (
17
17
  ~executeQuery: FetchState.query => promise<unit>,
18
18
  ~waitForNewBlock: (~currentBlockHeight: int) => promise<int>,
19
19
  ~onNewBlock: (~currentBlockHeight: int) => unit,
20
- ~targetBufferSize: int,
21
20
  ~stateId: int,
22
21
  ) => promise<unit>
23
22