/**
 * RelationStore — SoA (Structure of Arrays) memory-optimized relation store.
 *
 * Stub implementation. The full SoA optimization is planned but not yet
 * implemented. Tests in tests/lib/new-test/relation-store.test.js are
 * skipped until the real implementation lands.
 */
export class RelationStore {
  constructor() {
    this._relations = [];
  }

  add(srcId, rel, dstId, attrs = {}) {
    const idx = this._relations.length;
    this._relations.push({ srcId, rel, dstId, ...attrs });
    return idx;
  }

  get(idx) {
    return this._relations[idx] || null;
  }

  size() {
    return this._relations.length;
  }
}

export default RelationStore;
