@reifydb/core 0.1.6 → 0.2.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.
Files changed (141) hide show
  1. package/dist/index.d.ts +4 -28
  2. package/dist/index.js +0 -69
  3. package/dist/index.js.map +1 -1
  4. package/package.json +1 -1
  5. package/dist/constant.d.ts +0 -7
  6. package/dist/constant.d.ts.map +0 -1
  7. package/dist/constant.js +0 -7
  8. package/dist/constant.js.map +0 -1
  9. package/dist/decoder.d.ts +0 -8
  10. package/dist/decoder.d.ts.map +0 -1
  11. package/dist/decoder.js +0 -59
  12. package/dist/decoder.js.map +0 -1
  13. package/dist/index.d.ts.map +0 -1
  14. package/dist/schema/builder.d.ts +0 -45
  15. package/dist/schema/builder.d.ts.map +0 -1
  16. package/dist/schema/builder.js +0 -114
  17. package/dist/schema/builder.js.map +0 -1
  18. package/dist/schema/index.d.ts +0 -11
  19. package/dist/schema/index.d.ts.map +0 -1
  20. package/dist/schema/index.js +0 -12
  21. package/dist/schema/index.js.map +0 -1
  22. package/dist/schema/inference.d.ts +0 -16
  23. package/dist/schema/inference.d.ts.map +0 -1
  24. package/dist/schema/inference.js +0 -7
  25. package/dist/schema/inference.js.map +0 -1
  26. package/dist/schema/parser.d.ts +0 -8
  27. package/dist/schema/parser.d.ts.map +0 -1
  28. package/dist/schema/parser.js +0 -96
  29. package/dist/schema/parser.js.map +0 -1
  30. package/dist/schema/simple-test.d.ts +0 -7
  31. package/dist/schema/simple-test.d.ts.map +0 -1
  32. package/dist/schema/simple-test.js +0 -26
  33. package/dist/schema/simple-test.js.map +0 -1
  34. package/dist/schema/test-refactor.d.ts +0 -7
  35. package/dist/schema/test-refactor.d.ts.map +0 -1
  36. package/dist/schema/test-refactor.js +0 -97
  37. package/dist/schema/test-refactor.js.map +0 -1
  38. package/dist/schema/types.d.ts +0 -27
  39. package/dist/schema/types.d.ts.map +0 -1
  40. package/dist/schema/types.js +0 -7
  41. package/dist/schema/types.js.map +0 -1
  42. package/dist/schema/validator.d.ts +0 -8
  43. package/dist/schema/validator.d.ts.map +0 -1
  44. package/dist/schema/validator.js +0 -79
  45. package/dist/schema/validator.js.map +0 -1
  46. package/dist/value/blob.d.ts +0 -85
  47. package/dist/value/blob.d.ts.map +0 -1
  48. package/dist/value/blob.js +0 -255
  49. package/dist/value/blob.js.map +0 -1
  50. package/dist/value/bool.d.ts +0 -16
  51. package/dist/value/bool.d.ts.map +0 -1
  52. package/dist/value/bool.js +0 -46
  53. package/dist/value/bool.js.map +0 -1
  54. package/dist/value/date.d.ts +0 -71
  55. package/dist/value/date.d.ts.map +0 -1
  56. package/dist/value/date.js +0 -261
  57. package/dist/value/date.js.map +0 -1
  58. package/dist/value/datetime.d.ts +0 -99
  59. package/dist/value/datetime.d.ts.map +0 -1
  60. package/dist/value/datetime.js +0 -401
  61. package/dist/value/datetime.js.map +0 -1
  62. package/dist/value/float4.d.ts +0 -19
  63. package/dist/value/float4.d.ts.map +0 -1
  64. package/dist/value/float4.js +0 -68
  65. package/dist/value/float4.js.map +0 -1
  66. package/dist/value/float8.d.ts +0 -16
  67. package/dist/value/float8.d.ts.map +0 -1
  68. package/dist/value/float8.js +0 -44
  69. package/dist/value/float8.js.map +0 -1
  70. package/dist/value/index.d.ts +0 -38
  71. package/dist/value/index.d.ts.map +0 -1
  72. package/dist/value/index.js +0 -31
  73. package/dist/value/index.js.map +0 -1
  74. package/dist/value/int1.d.ts +0 -18
  75. package/dist/value/int1.d.ts.map +0 -1
  76. package/dist/value/int1.js +0 -46
  77. package/dist/value/int1.js.map +0 -1
  78. package/dist/value/int16.d.ts +0 -18
  79. package/dist/value/int16.d.ts.map +0 -1
  80. package/dist/value/int16.js +0 -67
  81. package/dist/value/int16.js.map +0 -1
  82. package/dist/value/int2.d.ts +0 -18
  83. package/dist/value/int2.d.ts.map +0 -1
  84. package/dist/value/int2.js +0 -46
  85. package/dist/value/int2.js.map +0 -1
  86. package/dist/value/int4.d.ts +0 -18
  87. package/dist/value/int4.d.ts.map +0 -1
  88. package/dist/value/int4.js +0 -46
  89. package/dist/value/int4.js.map +0 -1
  90. package/dist/value/int8.d.ts +0 -18
  91. package/dist/value/int8.d.ts.map +0 -1
  92. package/dist/value/int8.js +0 -53
  93. package/dist/value/int8.js.map +0 -1
  94. package/dist/value/interval.d.ts +0 -144
  95. package/dist/value/interval.d.ts.map +0 -1
  96. package/dist/value/interval.js +0 -357
  97. package/dist/value/interval.js.map +0 -1
  98. package/dist/value/rowid.d.ts +0 -18
  99. package/dist/value/rowid.d.ts.map +0 -1
  100. package/dist/value/rowid.js +0 -53
  101. package/dist/value/rowid.js.map +0 -1
  102. package/dist/value/time.d.ts +0 -74
  103. package/dist/value/time.d.ts.map +0 -1
  104. package/dist/value/time.js +0 -214
  105. package/dist/value/time.js.map +0 -1
  106. package/dist/value/uint1.d.ts +0 -18
  107. package/dist/value/uint1.d.ts.map +0 -1
  108. package/dist/value/uint1.js +0 -46
  109. package/dist/value/uint1.js.map +0 -1
  110. package/dist/value/uint16.d.ts +0 -18
  111. package/dist/value/uint16.d.ts.map +0 -1
  112. package/dist/value/uint16.js +0 -67
  113. package/dist/value/uint16.js.map +0 -1
  114. package/dist/value/uint2.d.ts +0 -18
  115. package/dist/value/uint2.d.ts.map +0 -1
  116. package/dist/value/uint2.js +0 -46
  117. package/dist/value/uint2.js.map +0 -1
  118. package/dist/value/uint4.d.ts +0 -18
  119. package/dist/value/uint4.d.ts.map +0 -1
  120. package/dist/value/uint4.js +0 -46
  121. package/dist/value/uint4.js.map +0 -1
  122. package/dist/value/uint8.d.ts +0 -19
  123. package/dist/value/uint8.d.ts.map +0 -1
  124. package/dist/value/uint8.js +0 -58
  125. package/dist/value/uint8.js.map +0 -1
  126. package/dist/value/undefined.d.ts +0 -48
  127. package/dist/value/undefined.d.ts.map +0 -1
  128. package/dist/value/undefined.js +0 -77
  129. package/dist/value/undefined.js.map +0 -1
  130. package/dist/value/utf8.d.ts +0 -16
  131. package/dist/value/utf8.d.ts.map +0 -1
  132. package/dist/value/utf8.js +0 -39
  133. package/dist/value/utf8.js.map +0 -1
  134. package/dist/value/uuid4.d.ts +0 -69
  135. package/dist/value/uuid4.d.ts.map +0 -1
  136. package/dist/value/uuid4.js +0 -162
  137. package/dist/value/uuid4.js.map +0 -1
  138. package/dist/value/uuid7.d.ts +0 -74
  139. package/dist/value/uuid7.d.ts.map +0 -1
  140. package/dist/value/uuid7.js +0 -175
  141. package/dist/value/uuid7.js.map +0 -1
package/dist/index.d.ts CHANGED
@@ -799,28 +799,6 @@ declare class Uint16Value implements Value {
799
799
  encode(): TypeValuePair;
800
800
  }
801
801
 
802
- /**
803
- * MIT License
804
- * Copyright (c) 2025 ReifyDB
805
- * See license.md file for full license text
806
- */
807
-
808
- declare class RowNumberValue implements Value {
809
- private static readonly MIN_VALUE;
810
- private static readonly MAX_VALUE;
811
- readonly type: Type;
812
- readonly value?: bigint;
813
- constructor(value?: bigint | number);
814
- static parse(str: string): RowNumberValue;
815
- valueOf(): bigint | undefined;
816
- toString(): string;
817
- /**
818
- * Compare two RowNumber values for equality
819
- */
820
- equals(other: Value): boolean;
821
- encode(): TypeValuePair;
822
- }
823
-
824
802
  /**
825
803
  * MIT License
826
804
  * Copyright (c) 2025 ReifyDB
@@ -1086,7 +1064,7 @@ declare class IdentityIdValue implements Value {
1086
1064
  * See license.md file for full license text
1087
1065
  */
1088
1066
 
1089
- type Type = "Blob" | "Boolean" | "Decimal" | "Float4" | "Float8" | "Int1" | "Int2" | "Int4" | "Int8" | "Int16" | "Uint1" | "Uint2" | "Uint4" | "Uint8" | "Uint16" | "Utf8" | "Date" | "DateTime" | "Time" | "Duration" | "Uuid4" | "Uuid7" | "Undefined" | "RowNumber" | "IdentityId";
1067
+ type Type = "Blob" | "Boolean" | "Decimal" | "Float4" | "Float8" | "Int1" | "Int2" | "Int4" | "Int8" | "Int16" | "Uint1" | "Uint2" | "Uint4" | "Uint8" | "Uint16" | "Utf8" | "Date" | "DateTime" | "Time" | "Duration" | "Uuid4" | "Uuid7" | "Undefined" | "IdentityId";
1090
1068
  interface TypeValuePair {
1091
1069
  type: Type;
1092
1070
  value: string;
@@ -1111,8 +1089,8 @@ declare function decode(pair: TypeValuePair): Value;
1111
1089
  * See license.md file for full license text
1112
1090
  */
1113
1091
 
1114
- type PrimitiveToTS<T extends Type> = T extends 'Blob' ? Uint8Array : T extends 'Boolean' ? boolean : T extends 'Decimal' ? string : T extends 'Float4' ? number : T extends 'Float8' ? number : T extends 'Int1' ? number : T extends 'Int2' ? number : T extends 'Int4' ? number : T extends 'Int8' ? bigint : T extends 'Int16' ? bigint : T extends 'Uint1' ? number : T extends 'Uint2' ? number : T extends 'Uint4' ? number : T extends 'Uint8' ? bigint : T extends 'Uint16' ? bigint : T extends 'Utf8' ? string : T extends 'Date' ? Date : T extends 'DateTime' ? Date : T extends 'Time' ? string : T extends 'Duration' ? string : T extends 'Uuid4' ? string : T extends 'Uuid7' ? string : T extends 'Undefined' ? undefined : T extends 'RowNumber' ? bigint : T extends 'IdentityId' ? string : never;
1115
- type PrimitiveToValue<T extends Type> = T extends 'Blob' ? BlobValue : T extends 'Boolean' ? BooleanValue : T extends 'Decimal' ? DecimalValue : T extends 'Float4' ? Float4Value : T extends 'Float8' ? Float8Value : T extends 'Int1' ? Int1Value : T extends 'Int2' ? Int2Value : T extends 'Int4' ? Int4Value : T extends 'Int8' ? Int8Value : T extends 'Int16' ? Int16Value : T extends 'Uint1' ? Uint1Value : T extends 'Uint2' ? Uint2Value : T extends 'Uint4' ? Uint4Value : T extends 'Uint8' ? Uint8Value : T extends 'Uint16' ? Uint16Value : T extends 'Utf8' ? Utf8Value : T extends 'Date' ? DateValue : T extends 'DateTime' ? DateTimeValue : T extends 'Time' ? TimeValue : T extends 'Duration' ? DurationValue : T extends 'Uuid4' ? Uuid4Value : T extends 'Uuid7' ? Uuid7Value : T extends 'Undefined' ? UndefinedValue : T extends 'RowNumber' ? RowNumberValue : T extends 'IdentityId' ? IdentityIdValue : never;
1092
+ type PrimitiveToTS<T extends Type> = T extends 'Blob' ? Uint8Array : T extends 'Boolean' ? boolean : T extends 'Decimal' ? string : T extends 'Float4' ? number : T extends 'Float8' ? number : T extends 'Int1' ? number : T extends 'Int2' ? number : T extends 'Int4' ? number : T extends 'Int8' ? bigint : T extends 'Int16' ? bigint : T extends 'Uint1' ? number : T extends 'Uint2' ? number : T extends 'Uint4' ? number : T extends 'Uint8' ? bigint : T extends 'Uint16' ? bigint : T extends 'Utf8' ? string : T extends 'Date' ? Date : T extends 'DateTime' ? Date : T extends 'Time' ? string : T extends 'Duration' ? string : T extends 'Uuid4' ? string : T extends 'Uuid7' ? string : T extends 'Undefined' ? undefined : T extends 'IdentityId' ? string : never;
1093
+ type PrimitiveToValue<T extends Type> = T extends 'Blob' ? BlobValue : T extends 'Boolean' ? BooleanValue : T extends 'Decimal' ? DecimalValue : T extends 'Float4' ? Float4Value : T extends 'Float8' ? Float8Value : T extends 'Int1' ? Int1Value : T extends 'Int2' ? Int2Value : T extends 'Int4' ? Int4Value : T extends 'Int8' ? Int8Value : T extends 'Int16' ? Int16Value : T extends 'Uint1' ? Uint1Value : T extends 'Uint2' ? Uint2Value : T extends 'Uint4' ? Uint4Value : T extends 'Uint8' ? Uint8Value : T extends 'Uint16' ? Uint16Value : T extends 'Utf8' ? Utf8Value : T extends 'Date' ? DateValue : T extends 'DateTime' ? DateTimeValue : T extends 'Time' ? TimeValue : T extends 'Duration' ? DurationValue : T extends 'Uuid4' ? Uuid4Value : T extends 'Uuid7' ? Uuid7Value : T extends 'Undefined' ? UndefinedValue : T extends 'IdentityId' ? IdentityIdValue : never;
1116
1094
  type InferSchema<S> = S extends PrimitiveSchemaNode<infer T> ? T extends Type ? PrimitiveToTS<T> : never : S extends ValueSchemaNode<infer T> ? T extends Type ? PrimitiveToValue<T> : never : S extends ObjectSchemaNode<infer P> ? {
1117
1095
  [K in keyof P]: InferSchema<P[K]>;
1118
1096
  } : S extends ArraySchemaNode<infer T> ? InferSchema<T>[] : S extends OptionalSchemaNode<infer T> ? InferSchema<T> | undefined : never;
@@ -1157,7 +1135,6 @@ declare class SchemaBuilder {
1157
1135
  static uuid7(): PrimitiveSchemaNode<'Uuid7'>;
1158
1136
  static uuid(): PrimitiveSchemaNode<'Uuid7'>;
1159
1137
  static undefined(): PrimitiveSchemaNode<'Undefined'>;
1160
- static rownumber(): PrimitiveSchemaNode<'RowNumber'>;
1161
1138
  static identityid(): PrimitiveSchemaNode<'IdentityId'>;
1162
1139
  static object<P extends Record<string, SchemaNode>>(properties: P): ObjectSchemaNode<P>;
1163
1140
  static array<T extends SchemaNode>(items: T): ArraySchemaNode<T>;
@@ -1186,7 +1163,6 @@ declare class SchemaBuilder {
1186
1163
  static uuid7Value(): ValueSchemaNode<'Uuid7'>;
1187
1164
  static undefinedValue(): ValueSchemaNode<'Undefined'>;
1188
1165
  static blobValue(): ValueSchemaNode<'Blob'>;
1189
- static rowIdValue(): ValueSchemaNode<'RowNumber'>;
1190
1166
  static identityIdValue(): ValueSchemaNode<'IdentityId'>;
1191
1167
  }
1192
1168
  declare const Schema: typeof SchemaBuilder;
@@ -1302,4 +1278,4 @@ type SingleFrameResult<S extends SchemaNode> = InferSchema<S>[];
1302
1278
  */
1303
1279
  declare function asFrameResults<S extends readonly SchemaNode[]>(results: any): FrameResults<S>;
1304
1280
 
1305
- export { type ArraySchemaNode, BlobValue, BooleanValue, type Column, DateTimeValue, DateValue, DecimalValue, type Diagnostic, type DiagnosticColumn, DurationValue, type ErrorResponse, Float4Value, Float8Value, type Fragment, type Frame, type FrameResults, IdentityIdValue, type InferSchema, type InferSchemas, Int16Value, Int1Value, Int2Value, Int4Value, Int8Value, type ObjectSchemaNode, type OptionalSchemaNode, type Params, type PrimitiveSchemaNode, type PrimitiveToTS, type PrimitiveToValue, ReifyError, RowNumberValue, Schema, SchemaBuilder, type SchemaNode, type SingleFrameResult, TimeValue, type Type, type TypeValuePair, UNDEFINED_VALUE, Uint16Value, Uint1Value, Uint2Value, Uint4Value, Uint8Value, UndefinedValue, Utf8Value, Uuid4Value, Uuid7Value, Value, type ValueSchemaNode, asFrameResults, decode, parseValue, validateSchema };
1281
+ export { type ArraySchemaNode, BlobValue, BooleanValue, type Column, DateTimeValue, DateValue, DecimalValue, type Diagnostic, type DiagnosticColumn, DurationValue, type ErrorResponse, Float4Value, Float8Value, type Fragment, type Frame, type FrameResults, IdentityIdValue, type InferSchema, type InferSchemas, Int16Value, Int1Value, Int2Value, Int4Value, Int8Value, type ObjectSchemaNode, type OptionalSchemaNode, type Params, type PrimitiveSchemaNode, type PrimitiveToTS, type PrimitiveToValue, ReifyError, Schema, SchemaBuilder, type SchemaNode, type SingleFrameResult, TimeValue, type Type, type TypeValuePair, UNDEFINED_VALUE, Uint16Value, Uint1Value, Uint2Value, Uint4Value, Uint8Value, UndefinedValue, Utf8Value, Uuid4Value, Uuid7Value, Value, type ValueSchemaNode, asFrameResults, decode, parseValue, validateSchema };
package/dist/index.js CHANGED
@@ -2169,63 +2169,6 @@ _Uint16Value.MIN_VALUE = BigInt(0);
2169
2169
  _Uint16Value.MAX_VALUE = BigInt("340282366920938463463374607431768211455");
2170
2170
  var Uint16Value = _Uint16Value;
2171
2171
 
2172
- // src/value/rownumber.ts
2173
- var _RowNumberValue = class _RowNumberValue {
2174
- constructor(value) {
2175
- this.type = "RowNumber";
2176
- if (value !== void 0) {
2177
- const bigintValue = typeof value === "number" ? BigInt(Math.trunc(value)) : value;
2178
- if (bigintValue < _RowNumberValue.MIN_VALUE || bigintValue > _RowNumberValue.MAX_VALUE) {
2179
- throw new Error(`RowNumber value must be between ${_RowNumberValue.MIN_VALUE} and ${_RowNumberValue.MAX_VALUE}, got ${bigintValue}`);
2180
- }
2181
- this.value = bigintValue;
2182
- } else {
2183
- this.value = void 0;
2184
- }
2185
- }
2186
- static parse(str) {
2187
- const trimmed = str.trim();
2188
- if (trimmed === "" || trimmed === UNDEFINED_VALUE) {
2189
- return new _RowNumberValue(void 0);
2190
- }
2191
- let value;
2192
- try {
2193
- value = BigInt(trimmed);
2194
- } catch (e) {
2195
- throw new Error(`Cannot parse "${str}" as RowNumber`);
2196
- }
2197
- if (value < _RowNumberValue.MIN_VALUE || value > _RowNumberValue.MAX_VALUE) {
2198
- throw new Error(`RowNumber value must be between ${_RowNumberValue.MIN_VALUE} and ${_RowNumberValue.MAX_VALUE}, got ${value}`);
2199
- }
2200
- return new _RowNumberValue(value);
2201
- }
2202
- valueOf() {
2203
- return this.value;
2204
- }
2205
- toString() {
2206
- return this.value === void 0 ? "undefined" : this.value.toString();
2207
- }
2208
- /**
2209
- * Compare two RowNumber values for equality
2210
- */
2211
- equals(other) {
2212
- if (other.type !== this.type) {
2213
- return false;
2214
- }
2215
- const otherRowNumber = other;
2216
- return this.value === otherRowNumber.value;
2217
- }
2218
- encode() {
2219
- return {
2220
- type: this.type,
2221
- value: this.value === void 0 ? UNDEFINED_VALUE : this.toString()
2222
- };
2223
- }
2224
- };
2225
- _RowNumberValue.MIN_VALUE = BigInt(0);
2226
- _RowNumberValue.MAX_VALUE = BigInt("18446744073709551615");
2227
- var RowNumberValue = _RowNumberValue;
2228
-
2229
2172
  // src/value/undefined.ts
2230
2173
  var UndefinedValue = class _UndefinedValue {
2231
2174
  constructor() {
@@ -2772,8 +2715,6 @@ function decode(pair) {
2772
2715
  return Int16Value.parse(pair.value);
2773
2716
  case "Duration":
2774
2717
  return DurationValue.parse(pair.value);
2775
- case "RowNumber":
2776
- return RowNumberValue.parse(pair.value);
2777
2718
  case "Time":
2778
2719
  return TimeValue.parse(pair.value);
2779
2720
  case "Uint1":
@@ -2893,9 +2834,6 @@ var SchemaBuilder = class {
2893
2834
  static undefined() {
2894
2835
  return { kind: "primitive", type: "Undefined" };
2895
2836
  }
2896
- static rownumber() {
2897
- return { kind: "primitive", type: "RowNumber" };
2898
- }
2899
2837
  static identityid() {
2900
2838
  return { kind: "primitive", type: "IdentityId" };
2901
2839
  }
@@ -2980,9 +2918,6 @@ var SchemaBuilder = class {
2980
2918
  static blobValue() {
2981
2919
  return { kind: "value", type: "Blob" };
2982
2920
  }
2983
- static rowIdValue() {
2984
- return { kind: "value", type: "RowNumber" };
2985
- }
2986
2921
  static identityIdValue() {
2987
2922
  return { kind: "value", type: "IdentityId" };
2988
2923
  }
@@ -3036,8 +2971,6 @@ function createValueInstance(type, value) {
3036
2971
  return new Uuid7Value(value);
3037
2972
  case "Undefined":
3038
2973
  return new UndefinedValue();
3039
- case "RowNumber":
3040
- return new RowNumberValue(value);
3041
2974
  default:
3042
2975
  throw new Error(`Unknown type: ${type}`);
3043
2976
  }
@@ -3104,7 +3037,6 @@ function validateSchema(schema, value) {
3104
3037
  case "Duration":
3105
3038
  case "Uuid4":
3106
3039
  case "Uuid7":
3107
- case "RowNumber":
3108
3040
  return typeof value === "string";
3109
3041
  case "Date":
3110
3042
  case "DateTime":
@@ -3190,7 +3122,6 @@ export {
3190
3122
  Int4Value,
3191
3123
  Int8Value,
3192
3124
  ReifyError,
3193
- RowNumberValue,
3194
3125
  Schema,
3195
3126
  SchemaBuilder,
3196
3127
  TimeValue,