databonk 0.0.2 → 0.0.3

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.
@@ -1,5 +1,29 @@
1
1
  import { Column } from './column';
2
+ import { IndexManager } from './index-manager.js';
3
+ import { IndexOptions, IndexEntry, IndexType } from './index.js';
2
4
  export type RowObject = Record<string, any>;
5
+ /**
6
+ * Options for DataFrame factory methods.
7
+ */
8
+ export interface DataFrameOptions {
9
+ /**
10
+ * Indices to create on the DataFrame at construction time.
11
+ *
12
+ * @example
13
+ * const df = DataFrame.fromRows(data, {
14
+ * indices: [
15
+ * { columns: 'id', type: 'unique' },
16
+ * { columns: 'department' },
17
+ * { columns: ['year', 'region'], type: 'sorted' }
18
+ * ]
19
+ * });
20
+ */
21
+ indices?: Array<{
22
+ columns: string | string[];
23
+ type?: IndexType;
24
+ name?: string;
25
+ }>;
26
+ }
3
27
  /**
4
28
  * RowProxy provides zero-allocation row access for iteration.
5
29
  * Reuses a single object while iterating, avoiding object creation per row.
@@ -33,6 +57,7 @@ export declare class RowProxy {
33
57
  export declare class DataFrame {
34
58
  private columns;
35
59
  readonly length: number;
60
+ private _indexManager;
36
61
  constructor(data: Record<string, Column> | Column[]);
37
62
  get columnNames(): string[];
38
63
  get columnCount(): number;
@@ -63,8 +88,61 @@ export declare class DataFrame {
63
88
  rename(columnMapping: Record<string, string>): DataFrame;
64
89
  toArray(): RowObject[];
65
90
  toColumns(): Record<string, any[]>;
66
- static from(data: RowObject[] | Record<string, any[]>): DataFrame;
67
- static fromRows(rows: RowObject[]): DataFrame;
68
- static fromColumns(data: Record<string, any[]>): DataFrame;
91
+ /**
92
+ * Get the IndexManager for this DataFrame.
93
+ * Creates one lazily if it doesn't exist.
94
+ */
95
+ get indexManager(): IndexManager;
96
+ /**
97
+ * Create an index on one or more columns.
98
+ *
99
+ * @param columns - Column name(s) to index
100
+ * @param options - Index options (type: 'hash' | 'sorted' | 'unique', name: string)
101
+ * @returns This DataFrame for chaining
102
+ *
103
+ * @example
104
+ * // Create a hash index (default)
105
+ * df.createIndex('userId');
106
+ *
107
+ * // Create a sorted index for range queries / merge-join
108
+ * df.createIndex(['year', 'region'], { type: 'sorted' });
109
+ *
110
+ * // Create a unique index (enforces uniqueness)
111
+ * df.createIndex('id', { type: 'unique' });
112
+ */
113
+ createIndex(columns: string | string[], options?: IndexOptions): this;
114
+ /**
115
+ * Drop an index by name.
116
+ *
117
+ * @param name - The index name
118
+ * @returns true if dropped, false if not found
119
+ */
120
+ dropIndex(name: string): boolean;
121
+ /**
122
+ * Check if an index exists for the given column(s).
123
+ *
124
+ * @param columns - Column name(s) to check
125
+ * @returns true if an index exists
126
+ */
127
+ hasIndex(columns: string | string[]): boolean;
128
+ /**
129
+ * List all index names on this DataFrame.
130
+ */
131
+ listIndices(): string[];
132
+ /**
133
+ * Get an index by name or columns.
134
+ *
135
+ * @param nameOrColumns - Index name or column names
136
+ * @returns The index entry or null
137
+ */
138
+ getIndex(nameOrColumns: string | string[]): IndexEntry | null;
139
+ static from(data: RowObject[] | Record<string, any[]>, options?: DataFrameOptions): DataFrame;
140
+ static fromRows(rows: RowObject[], options?: DataFrameOptions): DataFrame;
141
+ static fromColumns(data: Record<string, any[]>, options?: DataFrameOptions): DataFrame;
142
+ /**
143
+ * Apply options (like indices) to a DataFrame.
144
+ * @internal
145
+ */
146
+ private static applyOptions;
69
147
  }
70
148
  //# sourceMappingURL=dataframe.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dataframe.d.ts","sourceRoot":"","sources":["../../src/core/dataframe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAGlC,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAE5C;;;GAGG;AACH,qBAAa,QAAQ;IACnB,OAAO,CAAC,WAAW,CAAkC;IACrD,OAAO,CAAC,KAAK,CAAa;gBAEd,EAAE,EAAE,SAA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AAG,EAAE,CAAC,EAAE,OAAO,CAAC,EAAE,gBAAgB,GAAG,SAAS;IAQ7F,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,SAAS,EAAE,EAAE,OAAO,CAAC,EAAE,gBAAgB,GAAG,SAAS;IAiBzE,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,OAAO,CAAC,EAAE,gBAAgB,GAAG,SAAS;IAWtF;;;OAGG;IACH,OAAO,CAAC,MAAM,CAAC,YAAY;CAW5B"}
@@ -0,0 +1,97 @@
1
+ import { DataFrame } from './dataframe.js';
2
+ import { IndexOptions, IndexEntry, IndexLookupResult } from './index.js';
3
+ /**
4
+ * Manages persistent indices for a DataFrame.
5
+ * Indices are stored directly on the manager instance and persist until explicitly dropped.
6
+ */
7
+ export declare class IndexManager {
8
+ private indices;
9
+ private columnToIndices;
10
+ /**
11
+ * Create a new index on the given DataFrame.
12
+ *
13
+ * @param df - The DataFrame to index
14
+ * @param columns - Column(s) to include in the index key
15
+ * @param options - Index options (type, name)
16
+ * @returns The name of the created index
17
+ * @throws Error if unique index has duplicate values
18
+ */
19
+ createIndex(df: DataFrame, columns: string | string[], options?: IndexOptions): string;
20
+ /**
21
+ * Build the index data structure.
22
+ */
23
+ private buildIndex;
24
+ /**
25
+ * Build a hash index for fast equality lookups.
26
+ */
27
+ private buildHashIndex;
28
+ /**
29
+ * Build a sorted index for range queries and merge-joins.
30
+ */
31
+ private buildSortedIndex;
32
+ /**
33
+ * Build a unique index that enforces uniqueness.
34
+ */
35
+ private buildUniqueIndex;
36
+ /**
37
+ * Create a string key from column values at a given row index.
38
+ */
39
+ private createKey;
40
+ /**
41
+ * Generate a default index name.
42
+ */
43
+ private generateIndexName;
44
+ /**
45
+ * Get an index by name or by column list.
46
+ *
47
+ * @param nameOrColumns - Index name or array of column names
48
+ * @returns The index entry or null if not found
49
+ */
50
+ getIndex(nameOrColumns: string | string[]): IndexEntry | null;
51
+ /**
52
+ * Get an index suitable for the given columns.
53
+ * Returns the first matching index, preferring indices that exactly match the columns.
54
+ */
55
+ getIndexForColumns(columns: string[]): IndexEntry | null;
56
+ /**
57
+ * Drop an index by name.
58
+ *
59
+ * @param name - The index name
60
+ * @returns true if dropped, false if not found
61
+ */
62
+ dropIndex(name: string): boolean;
63
+ /**
64
+ * Check if an index exists for the given column(s).
65
+ */
66
+ hasIndex(columns: string | string[]): boolean;
67
+ /**
68
+ * Check if an index exists by name.
69
+ */
70
+ hasIndexByName(name: string): boolean;
71
+ /**
72
+ * List all index names.
73
+ */
74
+ listIndices(): string[];
75
+ /**
76
+ * Get all index entries.
77
+ */
78
+ getAllIndices(): IndexEntry[];
79
+ /**
80
+ * Perform a lookup on a hash or unique index.
81
+ */
82
+ lookup(indexName: string, key: string): IndexLookupResult;
83
+ /**
84
+ * Convert an index to a hash map format (for join operations).
85
+ * This allows the join algorithm to use the index without rebuilding.
86
+ */
87
+ toHashMap(indexName: string): Map<string, number[]> | null;
88
+ /**
89
+ * Clear all indices.
90
+ */
91
+ clear(): void;
92
+ /**
93
+ * Get the number of indices.
94
+ */
95
+ get size(): number;
96
+ }
97
+ //# sourceMappingURL=index-manager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-manager.d.ts","sourceRoot":"","sources":["../../src/core/index-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,OAAO,EAEL,YAAY,EACZ,UAAU,EAKV,iBAAiB,EAClB,MAAM,YAAY,CAAC;AAEpB;;;GAGG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,OAAO,CAAsC;IACrD,OAAO,CAAC,eAAe,CAAuC;IAE9D;;;;;;;;OAQG;IACH,WAAW,CACT,EAAE,EAAE,SAAS,EACb,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,GAAE,YAAiB,GACzB,MAAM;IAyCT;;OAEG;IACH,OAAO,CAAC,UAAU;IAalB;;OAEG;IACH,OAAO,CAAC,cAAc;IAiBtB;;OAEG;IACH,OAAO,CAAC,gBAAgB;IA6BxB;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAiBxB;;OAEG;IACH,OAAO,CAAC,SAAS;IAUjB;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAIzB;;;;;OAKG;IACH,QAAQ,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,UAAU,GAAG,IAAI;IAmB7D;;;OAGG;IACH,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,UAAU,GAAG,IAAI;IAiBxD;;;;;OAKG;IACH,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAmBhC;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,OAAO;IAK7C;;OAEG;IACH,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAIrC;;OAEG;IACH,WAAW,IAAI,MAAM,EAAE;IAIvB;;OAEG;IACH,aAAa,IAAI,UAAU,EAAE;IAI7B;;OAEG;IACH,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,iBAAiB;IA6BzD;;;OAGG;IACH,SAAS,CAAC,SAAS,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,IAAI;IA4B1D;;OAEG;IACH,KAAK,IAAI,IAAI;IAKb;;OAEG;IACH,IAAI,IAAI,IAAI,MAAM,CAEjB;CACF"}
@@ -0,0 +1,75 @@
1
+ /**
2
+ * Index types for DataFrame indexing operations.
3
+ */
4
+ /**
5
+ * Index type determines the data structure and capabilities:
6
+ * - 'hash': Hash map for equality lookups (O(1) average). Default for most use cases.
7
+ * - 'sorted': Sorted array for range queries and merge-joins (O(log n) lookup).
8
+ * - 'unique': Hash map with uniqueness constraint (primary key semantics).
9
+ */
10
+ export type IndexType = 'hash' | 'sorted' | 'unique';
11
+ /**
12
+ * Options for creating an index.
13
+ */
14
+ export interface IndexOptions {
15
+ /** Index type. Defaults to 'hash'. */
16
+ type?: IndexType;
17
+ /** Custom name for the index. Auto-generated if not provided. */
18
+ name?: string;
19
+ }
20
+ /**
21
+ * Hash index entry - maps string keys to row indices.
22
+ */
23
+ export interface HashIndexData {
24
+ type: 'hash';
25
+ /** Map from serialized key to array of row indices */
26
+ map: Map<string, number[]>;
27
+ }
28
+ /**
29
+ * Sorted index entry - maintains sorted order for range queries.
30
+ */
31
+ export interface SortedIndexData {
32
+ type: 'sorted';
33
+ /** Sorted array of { key, indices } pairs */
34
+ entries: Array<{
35
+ key: string;
36
+ indices: number[];
37
+ }>;
38
+ /** Map from key to position in entries array for O(1) lookup */
39
+ keyToPosition: Map<string, number>;
40
+ }
41
+ /**
42
+ * Unique index entry - enforces uniqueness constraint.
43
+ */
44
+ export interface UniqueIndexData {
45
+ type: 'unique';
46
+ /** Map from serialized key to single row index */
47
+ map: Map<string, number>;
48
+ }
49
+ /**
50
+ * Union type for all index data structures.
51
+ */
52
+ export type IndexData = HashIndexData | SortedIndexData | UniqueIndexData;
53
+ /**
54
+ * Complete index entry with metadata.
55
+ */
56
+ export interface IndexEntry {
57
+ /** Unique name for this index */
58
+ name: string;
59
+ /** Columns that make up the index key */
60
+ columns: string[];
61
+ /** The index data structure */
62
+ data: IndexData;
63
+ /** When the index was created (timestamp) */
64
+ createdAt: number;
65
+ }
66
+ /**
67
+ * Result of an index lookup operation.
68
+ */
69
+ export interface IndexLookupResult {
70
+ /** Row indices matching the lookup key */
71
+ indices: number[];
72
+ /** Whether the lookup was successful */
73
+ found: boolean;
74
+ }
75
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,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@
1
- export { DataFrame } from './core/dataframe.js';
1
+ export { DataFrame, DataFrameOptions } from './core/dataframe.js';
2
2
  export { Column } from './core/column.js';
3
+ export { IndexManager } from './core/index-manager.js';
4
+ export { IndexType, IndexOptions, IndexEntry, IndexData, HashIndexData, SortedIndexData, UniqueIndexData, IndexLookupResult, } from './core/index.js';
3
5
  export { GroupBy } from './operations/groupby.js';
4
- export { Joiner, JoinType } from './operations/join.js';
6
+ export { Joiner, JoinType, JoinAlgorithm, JoinOptions } from './operations/join.js';
5
7
  export { Reshaper } from './operations/reshape.js';
6
8
  export { ColumnDeriver, ColumnExpression } from './operations/derive.js';
7
9
  export { Aggregator, AggregateFunction, AggregateSpec } from './operations/aggregation.js';
@@ -10,6 +12,7 @@ export { SchemaValidator, SchemaBuilders, CommonSchemas, ValidationResult, Valid
10
12
  export { DataType } from './utils/types.js';
11
13
  export { BitSet } from './utils/bitset.js';
12
14
  export { PerformanceTimer, DataGenerator, MemoryProfiler } from './utils/performance.js';
15
+ import './core/index-manager.js';
13
16
  import './operations/aggregation.js';
14
17
  import './operations/groupby.js';
15
18
  import './operations/join.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC3F,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,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