@vibeorm/runtime 2.0.1 → 2.0.2

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.
@@ -28,9 +28,24 @@ type CachedText = {
28
28
  };
29
29
  /** `null` = poisoned: this shape verified unsafe once — never cache it. */
30
30
  type CacheSlot = CachedText | null;
31
- /** One per client (dialect-stable); shared across its transaction clients. */
31
+ /**
32
+ * One per client (dialect-stable); shared across its transaction clients.
33
+ *
34
+ * Bounded by least-recently-used eviction. LIMIT and OFFSET are rendered as
35
+ * literals and are therefore part of the key, so one offset-paginated query is
36
+ * a NEW shape per page: a single endpoint walking a large table produces
37
+ * hundreds of entries on its own. Evicting the entry that has gone longest
38
+ * without a read keeps the hot shapes cached through that churn; the earlier
39
+ * "clear everything at the cap" policy threw the hot shapes away with the
40
+ * pages and re-rendered them until the cache had refilled.
41
+ *
42
+ * A `Map` iterates in insertion order, so recency is kept by re-inserting on
43
+ * every hit: the first key is always the least recently used.
44
+ */
32
45
  export declare class StatementRenderCache {
33
46
  private readonly entries;
47
+ /** Number of cached shapes (poisoned ones included). */
48
+ get size(): number;
34
49
  get(key: string): CacheSlot | undefined;
35
50
  set(key: string, slot: CacheSlot): void;
36
51
  }
@@ -1 +1 @@
1
- {"version":3,"file":"render-cache.d.ts","sourceRoot":"","sources":["../src/render-cache.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAWH,OAAO,KAAK,EAMV,aAAa,EAEb,UAAU,EAEV,YAAY,EAGb,MAAM,cAAc,CAAC;AAItB,KAAK,UAAU,GAAG;IAChB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,SAAS,EAAE,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAC;CACnD,CAAC;AAEF,2EAA2E;AAC3E,KAAK,SAAS,GAAG,UAAU,GAAG,IAAI,CAAC;AAInC,8EAA8E;AAC9E,qBAAa,oBAAoB;IAC/B,OA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,CAoBhB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibeorm/runtime",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "Driver-agnostic query engine and client runtime for VibeORM v2",
5
5
  "keywords": [
6
6
  "orm",
@@ -30,6 +30,10 @@
30
30
  ".": {
31
31
  "types": "./dist/index.d.ts",
32
32
  "default": "./dist/index.js"
33
+ },
34
+ "./adapter-kit": {
35
+ "types": "./dist/adapter-kit/index.d.ts",
36
+ "default": "./dist/adapter-kit/index.js"
33
37
  }
34
38
  },
35
39
  "files": [
@@ -42,7 +46,7 @@
42
46
  },
43
47
  "dependencies": {
44
48
  "@vibeorm/schema": "2.0.0",
45
- "@vibeorm/sql": "2.0.1"
49
+ "@vibeorm/sql": "2.0.2"
46
50
  },
47
51
  "devDependencies": {
48
52
  "@electric-sql/pglite": "^0.5.4",