@rip-lang/db 1.1.3 → 1.1.5

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.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- <img src="https://raw.githubusercontent.com/shreeve/rip-lang/main/docs/rip.svg" style="width:50px" /> <br>
1
+ <img src="https://raw.githubusercontent.com/shreeve/rip-lang/main/docs/rip.png" style="width:50px" /> <br>
2
2
 
3
3
  # Rip DB - @rip-lang/db
4
4
 
@@ -147,7 +147,7 @@ serialization, uint64-aligned validity bitmaps, and proper timestamp encoding.
147
147
  - **DuckDB** library installed on the system
148
148
  - macOS: `brew install duckdb`
149
149
  - Linux: Install from [duckdb.org](https://duckdb.org/docs/installation)
150
- - **rip-lang** 2.8+ (installed automatically as a dependency)
150
+ - **rip-lang** 3.x (installed automatically as a dependency)
151
151
 
152
152
  Set `DUCKDB_LIB_PATH` if DuckDB is not in a standard location:
153
153
 
package/bin/rip-db CHANGED
@@ -1,9 +1,10 @@
1
1
  #!/usr/bin/env bun
2
2
 
3
3
  import { execFileSync } from 'child_process';
4
+ import { fileURLToPath } from 'url';
4
5
  import { dirname, join } from 'path';
5
6
 
6
- const dbRip = join(dirname(new URL(import.meta.url).pathname), '..', 'db.rip');
7
+ const dbRip = join(dirname(fileURLToPath(import.meta.url)), '..', 'db.rip');
7
8
 
8
9
  try {
9
10
  execFileSync('rip', [dbRip, ...process.argv.slice(2)], { stdio: 'inherit' });
@@ -55,9 +55,9 @@ export class BinarySerializer
55
55
  constructor: ->
56
56
  @buffer = []
57
57
 
58
- # ---------------------------------------------------------------------------
58
+ # ----------------------------------------------------------------------------
59
59
  # Primitive writers
60
- # ---------------------------------------------------------------------------
60
+ # ----------------------------------------------------------------------------
61
61
 
62
62
  writeUint8: (value) ->
63
63
  @buffer.push value & 0xFF
@@ -116,9 +116,9 @@ export class BinarySerializer
116
116
  @writeVarInt bytes.length
117
117
  @buffer.push ...bytes
118
118
 
119
- # ---------------------------------------------------------------------------
119
+ # ----------------------------------------------------------------------------
120
120
  # Object structure writers
121
- # ---------------------------------------------------------------------------
121
+ # ----------------------------------------------------------------------------
122
122
 
123
123
  writeFieldId: (id) ->
124
124
  @writeUint16LE id
@@ -144,9 +144,9 @@ export class BinarySerializer
144
144
  for item, i in items
145
145
  writer this, item, i
146
146
 
147
- # ---------------------------------------------------------------------------
147
+ # ----------------------------------------------------------------------------
148
148
  # Get final buffer
149
- # ---------------------------------------------------------------------------
149
+ # ----------------------------------------------------------------------------
150
150
 
151
151
  toArrayBuffer: ->
152
152
  new Uint8Array(@buffer).buffer
package/lib/duckdb.mjs CHANGED
@@ -248,8 +248,9 @@ function readUUID(dataPtr, row) {
248
248
 
249
249
  // DuckDB stores UUID as hugeint with XOR on the upper bits
250
250
  // Upper 64 bits have sign bit flipped for sorting
251
- const hi = BigInt(upper) ^ (1n << 63n);
252
- const lo = BigInt(lower);
251
+ const mask64 = (1n << 64n) - 1n;
252
+ const hi = (BigInt(upper) ^ (1n << 63n)) & mask64;
253
+ const lo = BigInt(lower) & mask64;
253
254
 
254
255
  const hex = ((hi << 64n) | lo).toString(16).padStart(32, '0');
255
256
  return `${hex.slice(0,8)}-${hex.slice(8,12)}-${hex.slice(12,16)}-${hex.slice(16,20)}-${hex.slice(20)}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rip-lang/db",
3
- "version": "1.1.3",
3
+ "version": "1.1.5",
4
4
  "description": "DuckDB server with official DuckDB UI — pure Bun FFI",
5
5
  "type": "module",
6
6
  "main": "db.rip",
@@ -34,8 +34,8 @@
34
34
  "author": "Steve Shreeve <steve.shreeve@gmail.com>",
35
35
  "license": "MIT",
36
36
  "dependencies": {
37
- "rip-lang": "^3.4.4",
38
- "@rip-lang/api": "^1.1.4"
37
+ "rip-lang": "^3.9.1",
38
+ "@rip-lang/api": "^1.1.6"
39
39
  },
40
40
  "files": [
41
41
  "db.rip",