@based/db 0.0.68 → 0.0.70

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.
Files changed (74) hide show
  1. package/README.md +6 -1
  2. package/dist/lib/darwin_aarch64/include/selva/fields.h +0 -9
  3. package/dist/lib/darwin_aarch64/include/selva_error.h +4 -1
  4. package/dist/lib/darwin_aarch64/libnode-v22.node +0 -0
  5. package/dist/lib/darwin_aarch64/libnode-v23.node +0 -0
  6. package/dist/lib/darwin_aarch64/libnode-v24.node +0 -0
  7. package/dist/lib/darwin_aarch64/libselva.dylib +0 -0
  8. package/dist/lib/linux_aarch64/include/selva/fields.h +0 -9
  9. package/dist/lib/linux_aarch64/include/selva_error.h +4 -1
  10. package/dist/lib/linux_aarch64/libnode-v22.node +0 -0
  11. package/dist/lib/linux_aarch64/libnode-v23.node +0 -0
  12. package/dist/lib/linux_aarch64/libnode-v24.node +0 -0
  13. package/dist/lib/linux_aarch64/libselva.so +0 -0
  14. package/dist/lib/linux_x86_64/include/selva/fields.h +0 -9
  15. package/dist/lib/linux_x86_64/include/selva_error.h +4 -1
  16. package/dist/lib/linux_x86_64/libnode-v22.node +0 -0
  17. package/dist/lib/linux_x86_64/libnode-v23.node +0 -0
  18. package/dist/lib/linux_x86_64/libnode-v24.node +0 -0
  19. package/dist/lib/linux_x86_64/libselva.so +0 -0
  20. package/dist/src/client/modify/alias.js +4 -0
  21. package/dist/src/client/modify/binary.d.ts +1 -1
  22. package/dist/src/client/modify/binary.js +22 -7
  23. package/dist/src/client/modify/create.js +91 -39
  24. package/dist/src/client/modify/fixed.d.ts +3 -3
  25. package/dist/src/client/modify/fixed.js +80 -20
  26. package/dist/src/client/modify/json.js +7 -0
  27. package/dist/src/client/modify/modify.js +3 -3
  28. package/dist/src/client/modify/references/edge.js +3 -3
  29. package/dist/src/client/modify/string.d.ts +1 -1
  30. package/dist/src/client/modify/string.js +17 -7
  31. package/dist/src/client/modify/text.d.ts +1 -1
  32. package/dist/src/client/modify/text.js +27 -15
  33. package/dist/src/client/modify/types.d.ts +2 -1
  34. package/dist/src/client/modify/types.js +6 -0
  35. package/dist/src/client/modify/update.js +5 -1
  36. package/dist/src/client/query/display.js +1 -1
  37. package/dist/src/client/query/filter/createFixedFilterBuffer.js +3 -0
  38. package/dist/src/client/query/filter/createReferenceFilter.js +3 -0
  39. package/dist/src/client/query/filter/createVariableFilterBuffer.js +21 -19
  40. package/dist/src/client/query/read/read.js +9 -10
  41. package/dist/src/native.d.ts +1 -0
  42. package/dist/src/native.js +3 -0
  43. package/dist/src/server/IoWorker.d.ts +16 -0
  44. package/dist/src/server/IoWorker.js +32 -3
  45. package/dist/src/server/QueryWorker.js +2 -2
  46. package/dist/src/server/blocks.d.ts +3 -1
  47. package/dist/src/server/blocks.js +31 -7
  48. package/dist/src/server/index.d.ts +1 -1
  49. package/dist/src/server/index.js +8 -11
  50. package/dist/src/server/migrate/index.js +25 -11
  51. package/dist/src/server/migrate/worker.js +70 -62
  52. package/dist/src/server/save.d.ts +7 -1
  53. package/dist/src/server/save.js +107 -50
  54. package/dist/src/server/schema.d.ts +1 -1
  55. package/dist/src/server/schema.js +6 -2
  56. package/dist/src/server/start.js +11 -5
  57. package/dist/src/server/tree.d.ts +11 -0
  58. package/dist/src/server/tree.js +0 -1
  59. package/dist/src/server/workers/DbWorker.d.ts +3 -2
  60. package/dist/src/server/workers/DbWorker.js +2 -1
  61. package/dist/src/server/workers/io_worker.js +22 -17
  62. package/dist/src/server/workers/io_worker_types.d.ts +9 -1
  63. package/dist/src/server/workers/worker.js +11 -3
  64. package/dist/src/types.d.ts +1 -0
  65. package/dist/src/types.js +1 -0
  66. package/dist/src/utils.js +1 -1
  67. package/package.json +5 -3
  68. package/dist/lib/darwin_aarch64/libjemalloc_selva.so.2 +0 -0
  69. package/dist/lib/darwin_aarch64/libnode-v20.node +0 -0
  70. package/dist/lib/darwin_aarch64/libnode-v21.node +0 -0
  71. package/dist/lib/linux_aarch64/libnode-v20.node +0 -0
  72. package/dist/lib/linux_aarch64/libnode-v21.node +0 -0
  73. package/dist/lib/linux_x86_64/libnode-v20.node +0 -0
  74. package/dist/lib/linux_x86_64/libnode-v21.node +0 -0
package/README.md CHANGED
@@ -619,6 +619,11 @@ await clientDb.setSchema({
619
619
  /* ... new or modified schema ... */
620
620
  },
621
621
  })
622
+ ```
622
623
 
623
624
  // Server processes and notifies clients.
624
- ```
625
+
626
+ ### Aggregations
627
+
628
+ BasedDb support aggregate functions such as `sum('prop1','prop2')`, `count()`, etc and operations such as `groupBY('prop')`.
629
+ See the specific doc [Aggregations](./README_Aggregate.md) for a detailed guide on its usage and features.
@@ -115,15 +115,6 @@ void selva_fields_ensure_ref_meta(
115
115
  const struct EdgeFieldConstraint *efc)
116
116
  __attribute__((nonnull));
117
117
 
118
- /**
119
- * Set field value.
120
- */
121
- SELVA_EXPORT
122
- int selva_fields_set(
123
- struct SelvaNode *node,
124
- const struct SelvaFieldSchema *fs,
125
- const void *value, size_t len) __attribute__((deprecated));
126
-
127
118
  SELVA_EXPORT
128
119
  int selva_fields_get_mutable_string(
129
120
  struct SelvaNode *node,
@@ -1,9 +1,11 @@
1
1
  /*
2
- * Copyright (c) 2022-2024 SAULX
2
+ * Copyright (c) 2022-2025 SAULX
3
3
  * SPDX-License-Identifier: MIT
4
4
  */
5
5
  #pragma once
6
6
 
7
+ #include "selva/_export.h"
8
+
7
9
  /*
8
10
  * Error codes.
9
11
  */
@@ -134,4 +136,5 @@
134
136
  * Selva error code to string.
135
137
  * Implemented in libutil.
136
138
  */
139
+ SELVA_EXPORT
137
140
  const char *selva_strerror(int err);
@@ -115,15 +115,6 @@ void selva_fields_ensure_ref_meta(
115
115
  const struct EdgeFieldConstraint *efc)
116
116
  __attribute__((nonnull));
117
117
 
118
- /**
119
- * Set field value.
120
- */
121
- SELVA_EXPORT
122
- int selva_fields_set(
123
- struct SelvaNode *node,
124
- const struct SelvaFieldSchema *fs,
125
- const void *value, size_t len) __attribute__((deprecated));
126
-
127
118
  SELVA_EXPORT
128
119
  int selva_fields_get_mutable_string(
129
120
  struct SelvaNode *node,
@@ -1,9 +1,11 @@
1
1
  /*
2
- * Copyright (c) 2022-2024 SAULX
2
+ * Copyright (c) 2022-2025 SAULX
3
3
  * SPDX-License-Identifier: MIT
4
4
  */
5
5
  #pragma once
6
6
 
7
+ #include "selva/_export.h"
8
+
7
9
  /*
8
10
  * Error codes.
9
11
  */
@@ -134,4 +136,5 @@
134
136
  * Selva error code to string.
135
137
  * Implemented in libutil.
136
138
  */
139
+ SELVA_EXPORT
137
140
  const char *selva_strerror(int err);
Binary file
@@ -115,15 +115,6 @@ void selva_fields_ensure_ref_meta(
115
115
  const struct EdgeFieldConstraint *efc)
116
116
  __attribute__((nonnull));
117
117
 
118
- /**
119
- * Set field value.
120
- */
121
- SELVA_EXPORT
122
- int selva_fields_set(
123
- struct SelvaNode *node,
124
- const struct SelvaFieldSchema *fs,
125
- const void *value, size_t len) __attribute__((deprecated));
126
-
127
118
  SELVA_EXPORT
128
119
  int selva_fields_get_mutable_string(
129
120
  struct SelvaNode *node,
@@ -1,9 +1,11 @@
1
1
  /*
2
- * Copyright (c) 2022-2024 SAULX
2
+ * Copyright (c) 2022-2025 SAULX
3
3
  * SPDX-License-Identifier: MIT
4
4
  */
5
5
  #pragma once
6
6
 
7
+ #include "selva/_export.h"
8
+
7
9
  /*
8
10
  * Error codes.
9
11
  */
@@ -134,4 +136,5 @@
134
136
  * Selva error code to string.
135
137
  * Implemented in libutil.
136
138
  */
139
+ SELVA_EXPORT
137
140
  const char *selva_strerror(int err);
Binary file
@@ -26,6 +26,10 @@ export function writeAlias(value, ctx, def, t, parentId, modifyOp) {
26
26
  if (modifyOp === CREATE) {
27
27
  def.seperateSort.bufferTmp[t.prop] = 2;
28
28
  ctx.hasSortField++;
29
+ if (def.hasSeperateDefaults) {
30
+ def.seperateDefaults.bufferTmp[t.prop] = 1;
31
+ ctx.hasDefaults++;
32
+ }
29
33
  }
30
34
  setCursor(ctx, def, t.prop, t.typeIndex, parentId, modifyOp);
31
35
  ctx.buf[ctx.len++] = modifyOp;
@@ -3,4 +3,4 @@ import { PropDef, SchemaTypeDef } from '@based/schema/def';
3
3
  import { ModifyOp, ModifyErr } from './types.js';
4
4
  export declare function getBuffer(value: any): Uint8Array | undefined;
5
5
  export declare function writeBinaryRaw(value: Uint8Array, ctx: ModifyCtx): void;
6
- export declare function writeBinary(value: any, ctx: ModifyCtx, schema: SchemaTypeDef, t: PropDef, parentId: number, modifyOp: ModifyOp): ModifyErr;
6
+ export declare function writeBinary(value: any, ctx: ModifyCtx, schema: SchemaTypeDef, t: PropDef, id: number, modifyOp: ModifyOp): ModifyErr;
@@ -1,5 +1,5 @@
1
1
  import { ENCODER } from '@saulx/utils';
2
- import { UPDATE, RANGE_ERR, DELETE, } from './types.js';
2
+ import { UPDATE, RANGE_ERR, DELETE, CREATE, MOD_OPS_TO_STRING, } from './types.js';
3
3
  import { ModifyError } from './ModifyRes.js';
4
4
  import { setCursor } from './setCursor.js';
5
5
  import native from '../../native.js';
@@ -32,15 +32,24 @@ export function writeBinaryRaw(value, ctx) {
32
32
  ctx.buf[ctx.len++] = crc >>>= 8;
33
33
  ctx.buf[ctx.len++] = crc >>>= 8;
34
34
  }
35
- export function writeBinary(value, ctx, schema, t, parentId, modifyOp) {
35
+ export function writeBinary(value, ctx, schema, t, id, modifyOp) {
36
36
  let size;
37
37
  if (value === null) {
38
38
  size = 0;
39
39
  }
40
40
  else {
41
- value = getBuffer(value);
42
- if (!value || !t.validation(value, t)) {
43
- return new ModifyError(t, value);
41
+ if (t.transform) {
42
+ // validation happens before
43
+ if (!value || !t.validation(value, t)) {
44
+ return new ModifyError(t, value);
45
+ }
46
+ value = getBuffer(t.transform(MOD_OPS_TO_STRING[modifyOp], value));
47
+ }
48
+ else {
49
+ value = getBuffer(value);
50
+ if (!value || !t.validation(value, t)) {
51
+ return new ModifyError(t, value);
52
+ }
44
53
  }
45
54
  size = value.byteLength + 6;
46
55
  }
@@ -49,7 +58,7 @@ export function writeBinary(value, ctx, schema, t, parentId, modifyOp) {
49
58
  if (ctx.len + 11 /* SIZE.DEFAULT_CURSOR */ + 1 > ctx.max) {
50
59
  return RANGE_ERR;
51
60
  }
52
- setCursor(ctx, schema, t.prop, t.typeIndex, parentId, modifyOp);
61
+ setCursor(ctx, schema, t.prop, t.typeIndex, id, modifyOp);
53
62
  ctx.buf[ctx.len++] = DELETE;
54
63
  }
55
64
  }
@@ -57,7 +66,13 @@ export function writeBinary(value, ctx, schema, t, parentId, modifyOp) {
57
66
  if (ctx.len + 11 /* SIZE.DEFAULT_CURSOR */ + 5 + size > ctx.max) {
58
67
  return RANGE_ERR;
59
68
  }
60
- setCursor(ctx, schema, t.prop, t.typeIndex, parentId, modifyOp);
69
+ if (modifyOp === CREATE) {
70
+ if (schema.hasSeperateDefaults) {
71
+ schema.seperateDefaults.bufferTmp[t.prop] = 1;
72
+ ctx.hasDefaults++;
73
+ }
74
+ }
75
+ setCursor(ctx, schema, t.prop, t.typeIndex, id, modifyOp);
61
76
  ctx.buf[ctx.len++] = modifyOp;
62
77
  writeBinaryRaw(value, ctx);
63
78
  }
@@ -1,69 +1,131 @@
1
- import { MICRO_BUFFER } from '@based/schema/def';
1
+ import { BINARY, MICRO_BUFFER, STRING, JSON, TEXT, ALIAS, } from '@based/schema/def';
2
+ import { inverseLangMap } from '@based/schema';
2
3
  import { startDrain, flushBuffer } from '../flushModify.js';
3
4
  import { setCursor } from './setCursor.js';
4
5
  import { modify } from './modify.js';
5
6
  import { ModifyState } from './ModifyRes.js';
6
7
  import { CREATE, RANGE_ERR, ADD_EMPTY_SORT, ADD_EMPTY_SORT_TEXT, } from './types.js';
7
8
  import { writeFixedValue } from './fixed.js';
8
- const appendCreate = (ctx, def, obj, res, unsafe) => {
9
+ import { writeBinary } from './binary.js';
10
+ import { writeString } from './string.js';
11
+ import { writeText } from './text.js';
12
+ import { writeJson } from './json.js';
13
+ import { writeAlias } from './alias.js';
14
+ import { getByPath } from '@saulx/utils';
15
+ const appendCreate = (ctx, schema, obj, res, unsafe) => {
9
16
  const len = ctx.len;
10
- let err = modify(ctx, res, obj, def, CREATE, def.tree, true, unsafe);
17
+ let err = modify(ctx, res, obj, schema, CREATE, schema.tree, true, unsafe);
11
18
  if (err) {
12
19
  return err;
13
20
  }
14
- if (ctx.len === len || def.mainLen === 0) {
21
+ if (ctx.len === len || schema.mainLen === 0) {
15
22
  if (ctx.len + 11 /* SIZE.DEFAULT_CURSOR */ > ctx.max) {
16
23
  return RANGE_ERR;
17
24
  }
18
- setCursor(ctx, def, 0, MICRO_BUFFER, res.tmpId, CREATE);
25
+ setCursor(ctx, schema, 0, MICRO_BUFFER, res.tmpId, CREATE);
19
26
  }
20
- if (def.createTs) {
27
+ if (schema.createTs) {
21
28
  const createTs = Date.now();
22
- for (const prop of def.createTs) {
29
+ for (const prop of schema.createTs) {
30
+ if (getByPath(obj, prop.path) !== undefined) {
31
+ continue;
32
+ }
23
33
  if (ctx.lastMain === -1) {
24
- let mainLenU32 = def.mainLen;
25
- setCursor(ctx, def, prop.prop, MICRO_BUFFER, res.tmpId, CREATE);
34
+ let mainLenU32 = schema.mainLen;
35
+ setCursor(ctx, schema, prop.prop, MICRO_BUFFER, res.tmpId, CREATE);
26
36
  ctx.buf[ctx.len++] = CREATE;
27
37
  ctx.buf[ctx.len++] = mainLenU32;
28
38
  ctx.buf[ctx.len++] = mainLenU32 >>>= 8;
29
39
  ctx.buf[ctx.len++] = mainLenU32 >>>= 8;
30
40
  ctx.buf[ctx.len++] = mainLenU32 >>>= 8;
31
41
  ctx.lastMain = ctx.len;
32
- ctx.buf.set(def.mainEmpty, ctx.len);
33
- ctx.len += def.mainLen;
42
+ ctx.buf.set(schema.mainEmpty, ctx.len);
43
+ ctx.len += schema.mainLen;
34
44
  }
35
- err = writeFixedValue(ctx, createTs, prop, ctx.lastMain + prop.start);
45
+ err = writeFixedValue(ctx, createTs, prop, ctx.lastMain + prop.start, CREATE);
36
46
  if (err) {
37
47
  return err;
38
48
  }
39
49
  }
40
50
  }
41
- else if (ctx.lastMain === -1 && !def.mainEmptyAllZeroes) {
51
+ else if (ctx.lastMain === -1 && !schema.mainEmptyAllZeroes) {
42
52
  // this is there to handle different defaults
43
53
  if (ctx.lastMain === -1) {
44
- let mainLenU32 = def.mainLen;
45
- setCursor(ctx, def, 0, MICRO_BUFFER, res.tmpId, CREATE);
54
+ let mainLenU32 = schema.mainLen;
55
+ setCursor(ctx, schema, 0, MICRO_BUFFER, res.tmpId, CREATE);
46
56
  ctx.buf[ctx.len++] = CREATE;
47
57
  ctx.buf[ctx.len++] = mainLenU32;
48
58
  ctx.buf[ctx.len++] = mainLenU32 >>>= 8;
49
59
  ctx.buf[ctx.len++] = mainLenU32 >>>= 8;
50
60
  ctx.buf[ctx.len++] = mainLenU32 >>>= 8;
51
61
  ctx.lastMain = ctx.len;
52
- ctx.buf.set(def.mainEmpty, ctx.len);
53
- ctx.len += def.mainLen;
62
+ ctx.buf.set(schema.mainEmpty, ctx.len);
63
+ ctx.len += schema.mainLen;
54
64
  }
55
65
  // add text & string here
56
66
  }
57
- if (def.hasSeperateSort) {
58
- if (ctx.hasSortField !== def.seperateSort.size - 1) {
67
+ if (schema.hasSeperateDefaults) {
68
+ const buf = schema.seperateDefaults.bufferTmp;
69
+ // if ctx.hasDefault === -1 means it needs defaults
70
+ if (ctx.hasDefaults !== schema.seperateDefaults.props.size - 1) {
71
+ const id = res.tmpId;
72
+ for (const propDef of schema.seperateDefaults.props.values()) {
73
+ const prop = propDef.prop;
74
+ const type = propDef.typeIndex;
75
+ if (schema.seperateDefaults.bufferTmp[prop] === 0) {
76
+ if (type === BINARY) {
77
+ writeBinary(propDef.default, ctx, schema, propDef, id, CREATE);
78
+ }
79
+ else if (type === STRING) {
80
+ writeString(0, propDef.default, ctx, schema, propDef, id, CREATE);
81
+ }
82
+ else if (type === TEXT) {
83
+ writeText(propDef.default, ctx, schema, propDef, res, id, CREATE);
84
+ }
85
+ else if (type === JSON) {
86
+ writeJson(propDef.default, ctx, schema, propDef, id, CREATE);
87
+ }
88
+ else if (type === ALIAS) {
89
+ writeAlias(propDef.default, ctx, schema, propDef, id, CREATE);
90
+ }
91
+ }
92
+ else if (type === TEXT) {
93
+ const buf = schema.seperateTextSort.bufferTmp;
94
+ const amount = schema.localeSize + 1;
95
+ const len = amount * schema.seperateTextSort.props.length;
96
+ for (const { prop } of schema.seperateTextSort.props) {
97
+ const index = prop * amount;
98
+ if (buf[index] !== 0) {
99
+ for (let i = index + 1; i < len + index; i++) {
100
+ const lang = buf[i];
101
+ if (lang !== 0) {
102
+ const val = propDef.default[inverseLangMap.get(lang)];
103
+ if (val !== undefined) {
104
+ writeString(lang, val, ctx, schema, propDef, res.tmpId, CREATE);
105
+ }
106
+ }
107
+ }
108
+ }
109
+ }
110
+ }
111
+ }
112
+ }
113
+ if (ctx.hasDefaults !== -1) {
114
+ buf.fill(0);
115
+ }
116
+ ctx.hasDefaults = -1;
117
+ }
118
+ if (schema.hasSeperateSort) {
119
+ // just do it here!
120
+ if (ctx.hasSortField !== schema.seperateSort.size - 1) {
59
121
  if (ctx.len + 3 > ctx.max) {
60
122
  return RANGE_ERR;
61
123
  }
62
124
  ctx.buf[ctx.len++] = ADD_EMPTY_SORT;
63
125
  let sizepos = ctx.len;
64
126
  ctx.len += 2;
65
- for (const { prop } of def.seperateSort.props) {
66
- if (def.seperateSort.bufferTmp[prop] === 0) {
127
+ for (const { prop } of schema.seperateSort.props) {
128
+ if (schema.seperateSort.bufferTmp[prop] === 0) {
67
129
  if (ctx.len + 1 > ctx.max) {
68
130
  return RANGE_ERR;
69
131
  }
@@ -75,33 +137,23 @@ const appendCreate = (ctx, def, obj, res, unsafe) => {
75
137
  ctx.buf[sizepos] = size >>>= 8;
76
138
  }
77
139
  if (ctx.hasSortField !== -1) {
78
- def.seperateSort.bufferTmp.set(def.seperateSort.buffer, 0);
140
+ schema.seperateSort.bufferTmp.set(schema.seperateSort.buffer, 0);
79
141
  }
80
142
  // add test for this
81
143
  ctx.hasSortField = -1;
82
144
  }
83
- // if (def.hasSeperateDefaults) {
84
- // const buf = def.seperateDefaults.bufferTmp
85
- // if (ctx.hasDefaults !== def.seperateDefaults.props.size - 1) {
86
- // //
87
- // }
88
- // if (ctx.hasDefaults !== -1) {
89
- // buf.set(def.seperateTextSort.buffer, 0)
90
- // }
91
- // ctx.hasDefaults = -1
92
- // }
93
- if (def.hasSeperateTextSort) {
94
- const buf = def.seperateTextSort.bufferTmp;
95
- if (ctx.hasSortText !== def.seperateTextSort.size - 1) {
145
+ if (schema.hasSeperateTextSort) {
146
+ const buf = schema.seperateTextSort.bufferTmp;
147
+ if (ctx.hasSortText !== schema.seperateTextSort.size - 1) {
96
148
  if (ctx.len + 3 > ctx.max) {
97
149
  return RANGE_ERR;
98
150
  }
99
151
  ctx.buf[ctx.len++] = ADD_EMPTY_SORT_TEXT;
100
152
  let sizepos = ctx.len;
101
153
  ctx.len += 2;
102
- const amount = def.localeSize + 1;
103
- const len = amount * def.seperateTextSort.props.length;
104
- for (const { prop } of def.seperateTextSort.props) {
154
+ const amount = schema.localeSize + 1;
155
+ const len = amount * schema.seperateTextSort.props.length;
156
+ for (const { prop } of schema.seperateTextSort.props) {
105
157
  const index = prop * amount;
106
158
  if (buf[index] !== 0) {
107
159
  ctx.buf[ctx.len++] = prop;
@@ -120,7 +172,7 @@ const appendCreate = (ctx, def, obj, res, unsafe) => {
120
172
  // [size][size] [prop][len][lang][lang]
121
173
  }
122
174
  if (ctx.hasSortText !== -1) {
123
- buf.set(def.seperateTextSort.buffer, 0);
175
+ buf.set(schema.seperateTextSort.buffer, 0);
124
176
  }
125
177
  ctx.hasSortText = -1;
126
178
  }
@@ -1,5 +1,5 @@
1
1
  import { ModifyCtx } from '../../index.js';
2
2
  import { PropDef, PropDefEdge } from '@based/schema/def';
3
- import { ModifyErr } from './types.js';
4
- export declare const writeFixedValue: (ctx: ModifyCtx, val: any, def: PropDef | PropDefEdge, pos: number) => ModifyErr;
5
- export declare const appendFixedValue: (ctx: ModifyCtx, val: any, def: PropDef | PropDefEdge) => ModifyErr;
3
+ import { ModifyErr, ModifyOp } from './types.js';
4
+ export declare const writeFixedValue: (ctx: ModifyCtx, value: any, def: PropDef | PropDefEdge, pos: number, mod: ModifyOp) => ModifyErr;
5
+ export declare const appendFixedValue: (ctx: ModifyCtx, val: any, def: PropDef | PropDefEdge, mod: ModifyOp) => ModifyErr;