Skip to content

Commit bf43681

Browse files
committed
Sync EQL v3 concrete domain names
1 parent 1173da7 commit bf43681

10 files changed

Lines changed: 4127 additions & 4118 deletions

File tree

.changeset/eql-v3-ffi-0-27-concrete-types.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
'@cipherstash/stack': minor
33
---
44

5-
Upgrade `@cipherstash/protect-ffi` to 0.27.0 and update EQL v3 concrete Postgres domain names to match the SQL fixture (`int4*`, `int2*`, `bool`, `float4*`, and `float8*`). The public factories remain semantic (`Integer`, `Smallint`, `Boolean`, `Real`, `Double`) while their concrete domains change, so this is a minor release.
5+
Upgrade `@cipherstash/protect-ffi` to 0.27.0 and update EQL v3 concrete Postgres domain names to match the SQL fixture (`integer*`, `smallint*`, `bool`, `real*`, and `double*`). The public factories remain semantic (`Integer`, `Smallint`, `Boolean`, `Real`, `Double`) while their concrete domains change, so this is a minor release.

packages/stack/__tests__/fixtures/eql-v3/cipherstash-encrypt-v3.sql

Lines changed: 4054 additions & 4054 deletions
Large diffs are not rendered by default.

packages/stack/__tests__/schema-v3-pg.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ beforeAll(async () => {
107107
await sql`
108108
CREATE TABLE IF NOT EXISTS protect_ci_v3_typed_domains (
109109
id INTEGER PRIMARY KEY GENERATED ALWAYS AS IDENTITY,
110-
age eql_v3.int4_ord NOT NULL,
110+
age eql_v3.integer_ord NOT NULL,
111111
nickname eql_v3.text_eq NOT NULL,
112112
active eql_v3.bool NOT NULL,
113113
test_run_id TEXT NOT NULL
@@ -280,7 +280,7 @@ describeLivePg('eql_v3 text_search postgres integration', () => {
280280
const [inserted] = await sql<{ id: number }[]>`
281281
INSERT INTO protect_ci_v3_typed_domains (age, nickname, active, test_run_id)
282282
VALUES (
283-
${sql.json(age as postgres.JSONValue)}::eql_v3.int4_ord,
283+
${sql.json(age as postgres.JSONValue)}::eql_v3.integer_ord,
284284
${sql.json(nickname as postgres.JSONValue)}::eql_v3.text_eq,
285285
${sql.json(active as postgres.JSONValue)}::eql_v3.bool,
286286
${TEST_RUN_ID}
@@ -333,7 +333,7 @@ describeLivePg('eql_v3 text_search postgres integration', () => {
333333
const [row] = await sql<{ id: number }[]>`
334334
INSERT INTO protect_ci_v3_typed_domains (age, nickname, active, test_run_id)
335335
VALUES (
336-
${sql.json(ageCt)}::eql_v3.int4_ord,
336+
${sql.json(ageCt)}::eql_v3.integer_ord,
337337
${sql.json(nick)}::eql_v3.text_eq,
338338
${sql.json(act)}::eql_v3.bool,
339339
${TEST_RUN_ID}

packages/stack/__tests__/schema-v3.test.ts

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -158,25 +158,27 @@ describe('eql_v3 text_match column', () => {
158158

159159
describe('eql_v3 concrete type names', () => {
160160
it('preserves public factory names while exposing concrete Postgres domain names', () => {
161-
expect(types.Integer('n').getEqlType()).toBe('eql_v3.int4')
162-
expect(types.IntegerEq('n').getEqlType()).toBe('eql_v3.int4_eq')
163-
expect(types.IntegerOrdOre('n').getEqlType()).toBe('eql_v3.int4_ord_ore')
164-
expect(types.IntegerOrd('n').getEqlType()).toBe('eql_v3.int4_ord')
165-
166-
expect(types.Smallint('n').getEqlType()).toBe('eql_v3.int2')
167-
expect(types.SmallintEq('n').getEqlType()).toBe('eql_v3.int2_eq')
168-
expect(types.SmallintOrdOre('n').getEqlType()).toBe('eql_v3.int2_ord_ore')
169-
expect(types.SmallintOrd('n').getEqlType()).toBe('eql_v3.int2_ord')
161+
expect(types.Integer('n').getEqlType()).toBe('eql_v3.integer')
162+
expect(types.IntegerEq('n').getEqlType()).toBe('eql_v3.integer_eq')
163+
expect(types.IntegerOrdOre('n').getEqlType()).toBe('eql_v3.integer_ord_ore')
164+
expect(types.IntegerOrd('n').getEqlType()).toBe('eql_v3.integer_ord')
165+
166+
expect(types.Smallint('n').getEqlType()).toBe('eql_v3.smallint')
167+
expect(types.SmallintEq('n').getEqlType()).toBe('eql_v3.smallint_eq')
168+
expect(types.SmallintOrdOre('n').getEqlType()).toBe(
169+
'eql_v3.smallint_ord_ore',
170+
)
171+
expect(types.SmallintOrd('n').getEqlType()).toBe('eql_v3.smallint_ord')
170172

171173
expect(types.Boolean('b').getEqlType()).toBe('eql_v3.bool')
172-
expect(types.Real('n').getEqlType()).toBe('eql_v3.float4')
173-
expect(types.RealEq('n').getEqlType()).toBe('eql_v3.float4_eq')
174-
expect(types.RealOrdOre('n').getEqlType()).toBe('eql_v3.float4_ord_ore')
175-
expect(types.RealOrd('n').getEqlType()).toBe('eql_v3.float4_ord')
176-
expect(types.Double('n').getEqlType()).toBe('eql_v3.float8')
177-
expect(types.DoubleEq('n').getEqlType()).toBe('eql_v3.float8_eq')
178-
expect(types.DoubleOrdOre('n').getEqlType()).toBe('eql_v3.float8_ord_ore')
179-
expect(types.DoubleOrd('n').getEqlType()).toBe('eql_v3.float8_ord')
174+
expect(types.Real('n').getEqlType()).toBe('eql_v3.real')
175+
expect(types.RealEq('n').getEqlType()).toBe('eql_v3.real_eq')
176+
expect(types.RealOrdOre('n').getEqlType()).toBe('eql_v3.real_ord_ore')
177+
expect(types.RealOrd('n').getEqlType()).toBe('eql_v3.real_ord')
178+
expect(types.Double('n').getEqlType()).toBe('eql_v3.double')
179+
expect(types.DoubleEq('n').getEqlType()).toBe('eql_v3.double_eq')
180+
expect(types.DoubleOrdOre('n').getEqlType()).toBe('eql_v3.double_ord_ore')
181+
expect(types.DoubleOrd('n').getEqlType()).toBe('eql_v3.double_ord')
180182
})
181183
})
182184

@@ -425,8 +427,10 @@ describe('eql_v3 equality via ORE on order-capable columns (regression)', () =>
425427
// operator) instead of throwing on the absent `unique` index. (Text order
426428
// domains DO carry `hm` and resolve equality to `unique` instead — see the
427429
// text-order regression below.)
430+
// Keep these labels aligned with the checked-in EQL build; a mismatch here
431+
// means the stack package is out of sync with the underlying domain surface.
428432
it.each([
429-
['int4_ord', types.IntegerOrd],
433+
['IntegerOrd', types.IntegerOrd],
430434
['date_ord', types.DateOrd],
431435
['numeric_ord', types.NumericOrd],
432436
] as const)('%s resolves equality to the ore index', (_name, builder) => {
@@ -463,8 +467,8 @@ describe('eql_v3 text order domains carry the hm (unique) index (regression)', (
463467
})
464468

465469
it.each([
466-
['int4_ord_ore', types.IntegerOrdOre],
467-
['int4_ord', types.IntegerOrd],
470+
['IntegerOrdOre', types.IntegerOrdOre],
471+
['IntegerOrd', types.IntegerOrd],
468472
['date_ord_ore', types.DateOrdOre],
469473
['numeric_ord', types.NumericOrd],
470474
] as const)('%s (numeric/date order) emits ore only — no unique', (_name, builder) => {

packages/stack/__tests__/v3-matrix/catalog.ts

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -211,15 +211,15 @@ const NUM_ERR = [
211211
// biome-ignore format: one row per domain reads as a table; keep it dense.
212212
export const V3_MATRIX = {
213213
// integer
214-
'eql_v3.int4': { builder: types.Integer, ColumnClass: EncryptedIntegerColumn, castAs: 'number', capabilities: STORAGE, indexes: NONE, samples: INTEGER_S, errorSamples: NUM_ERR },
215-
'eql_v3.int4_eq': { builder: types.IntegerEq, ColumnClass: EncryptedIntegerEqColumn, castAs: 'number', capabilities: EQ, indexes: UNIQUE_IDX, samples: INTEGER_S, errorSamples: NUM_ERR },
216-
'eql_v3.int4_ord_ore': { builder: types.IntegerOrdOre, ColumnClass: EncryptedIntegerOrdOreColumn, castAs: 'number', capabilities: ORD, indexes: ORE_IDX, samples: INTEGER_S, errorSamples: NUM_ERR },
217-
'eql_v3.int4_ord': { builder: types.IntegerOrd, ColumnClass: EncryptedIntegerOrdColumn, castAs: 'number', capabilities: ORD, indexes: ORE_IDX, samples: INTEGER_S, errorSamples: NUM_ERR },
214+
'eql_v3.integer': { builder: types.Integer, ColumnClass: EncryptedIntegerColumn, castAs: 'number', capabilities: STORAGE, indexes: NONE, samples: INTEGER_S, errorSamples: NUM_ERR },
215+
'eql_v3.integer_eq': { builder: types.IntegerEq, ColumnClass: EncryptedIntegerEqColumn, castAs: 'number', capabilities: EQ, indexes: UNIQUE_IDX, samples: INTEGER_S, errorSamples: NUM_ERR },
216+
'eql_v3.integer_ord_ore': { builder: types.IntegerOrdOre, ColumnClass: EncryptedIntegerOrdOreColumn, castAs: 'number', capabilities: ORD, indexes: ORE_IDX, samples: INTEGER_S, errorSamples: NUM_ERR },
217+
'eql_v3.integer_ord': { builder: types.IntegerOrd, ColumnClass: EncryptedIntegerOrdColumn, castAs: 'number', capabilities: ORD, indexes: ORE_IDX, samples: INTEGER_S, errorSamples: NUM_ERR },
218218
// smallint
219-
'eql_v3.int2': { builder: types.Smallint, ColumnClass: EncryptedSmallintColumn, castAs: 'number', capabilities: STORAGE, indexes: NONE, samples: SMALLINT_S, errorSamples: NUM_ERR },
220-
'eql_v3.int2_eq': { builder: types.SmallintEq, ColumnClass: EncryptedSmallintEqColumn, castAs: 'number', capabilities: EQ, indexes: UNIQUE_IDX, samples: SMALLINT_S, errorSamples: NUM_ERR },
221-
'eql_v3.int2_ord_ore': { builder: types.SmallintOrdOre, ColumnClass: EncryptedSmallintOrdOreColumn, castAs: 'number', capabilities: ORD, indexes: ORE_IDX, samples: SMALLINT_S, errorSamples: NUM_ERR },
222-
'eql_v3.int2_ord': { builder: types.SmallintOrd, ColumnClass: EncryptedSmallintOrdColumn, castAs: 'number', capabilities: ORD, indexes: ORE_IDX, samples: SMALLINT_S, errorSamples: NUM_ERR },
219+
'eql_v3.smallint': { builder: types.Smallint, ColumnClass: EncryptedSmallintColumn, castAs: 'number', capabilities: STORAGE, indexes: NONE, samples: SMALLINT_S, errorSamples: NUM_ERR },
220+
'eql_v3.smallint_eq': { builder: types.SmallintEq, ColumnClass: EncryptedSmallintEqColumn, castAs: 'number', capabilities: EQ, indexes: UNIQUE_IDX, samples: SMALLINT_S, errorSamples: NUM_ERR },
221+
'eql_v3.smallint_ord_ore': { builder: types.SmallintOrdOre, ColumnClass: EncryptedSmallintOrdOreColumn, castAs: 'number', capabilities: ORD, indexes: ORE_IDX, samples: SMALLINT_S, errorSamples: NUM_ERR },
222+
'eql_v3.smallint_ord': { builder: types.SmallintOrd, ColumnClass: EncryptedSmallintOrdColumn, castAs: 'number', capabilities: ORD, indexes: ORE_IDX, samples: SMALLINT_S, errorSamples: NUM_ERR },
223223
// date
224224
'eql_v3.date': { builder: types.Date, ColumnClass: EncryptedDateColumn, castAs: 'date', capabilities: STORAGE, indexes: NONE, samples: DATE_S },
225225
'eql_v3.date_eq': { builder: types.DateEq, ColumnClass: EncryptedDateEqColumn, castAs: 'date', capabilities: EQ, indexes: UNIQUE_IDX, samples: DATE_S },
@@ -245,13 +245,13 @@ export const V3_MATRIX = {
245245
// boolean
246246
'eql_v3.bool': { builder: types.Boolean, ColumnClass: EncryptedBooleanColumn, castAs: 'boolean', capabilities: STORAGE, indexes: NONE, samples: BOOLEAN_S },
247247
// real
248-
'eql_v3.float4': { builder: types.Real, ColumnClass: EncryptedRealColumn, castAs: 'number', capabilities: STORAGE, indexes: NONE, samples: REAL_S, errorSamples: NUM_ERR },
249-
'eql_v3.float4_eq': { builder: types.RealEq, ColumnClass: EncryptedRealEqColumn, castAs: 'number', capabilities: EQ, indexes: UNIQUE_IDX, samples: REAL_S, errorSamples: NUM_ERR },
250-
'eql_v3.float4_ord_ore': { builder: types.RealOrdOre, ColumnClass: EncryptedRealOrdOreColumn, castAs: 'number', capabilities: ORD, indexes: ORE_IDX, samples: REAL_S, errorSamples: NUM_ERR },
251-
'eql_v3.float4_ord': { builder: types.RealOrd, ColumnClass: EncryptedRealOrdColumn, castAs: 'number', capabilities: ORD, indexes: ORE_IDX, samples: REAL_S, errorSamples: NUM_ERR },
248+
'eql_v3.real': { builder: types.Real, ColumnClass: EncryptedRealColumn, castAs: 'number', capabilities: STORAGE, indexes: NONE, samples: REAL_S, errorSamples: NUM_ERR },
249+
'eql_v3.real_eq': { builder: types.RealEq, ColumnClass: EncryptedRealEqColumn, castAs: 'number', capabilities: EQ, indexes: UNIQUE_IDX, samples: REAL_S, errorSamples: NUM_ERR },
250+
'eql_v3.real_ord_ore': { builder: types.RealOrdOre, ColumnClass: EncryptedRealOrdOreColumn, castAs: 'number', capabilities: ORD, indexes: ORE_IDX, samples: REAL_S, errorSamples: NUM_ERR },
251+
'eql_v3.real_ord': { builder: types.RealOrd, ColumnClass: EncryptedRealOrdColumn, castAs: 'number', capabilities: ORD, indexes: ORE_IDX, samples: REAL_S, errorSamples: NUM_ERR },
252252
// double
253-
'eql_v3.float8': { builder: types.Double, ColumnClass: EncryptedDoubleColumn, castAs: 'number', capabilities: STORAGE, indexes: NONE, samples: DOUBLE_S, errorSamples: NUM_ERR },
254-
'eql_v3.float8_eq': { builder: types.DoubleEq, ColumnClass: EncryptedDoubleEqColumn, castAs: 'number', capabilities: EQ, indexes: UNIQUE_IDX, samples: DOUBLE_S, errorSamples: NUM_ERR },
255-
'eql_v3.float8_ord_ore': { builder: types.DoubleOrdOre, ColumnClass: EncryptedDoubleOrdOreColumn, castAs: 'number', capabilities: ORD, indexes: ORE_IDX, samples: DOUBLE_S, errorSamples: NUM_ERR },
256-
'eql_v3.float8_ord': { builder: types.DoubleOrd, ColumnClass: EncryptedDoubleOrdColumn, castAs: 'number', capabilities: ORD, indexes: ORE_IDX, samples: DOUBLE_S, errorSamples: NUM_ERR },
253+
'eql_v3.double': { builder: types.Double, ColumnClass: EncryptedDoubleColumn, castAs: 'number', capabilities: STORAGE, indexes: NONE, samples: DOUBLE_S, errorSamples: NUM_ERR },
254+
'eql_v3.double_eq': { builder: types.DoubleEq, ColumnClass: EncryptedDoubleEqColumn, castAs: 'number', capabilities: EQ, indexes: UNIQUE_IDX, samples: DOUBLE_S, errorSamples: NUM_ERR },
255+
'eql_v3.double_ord_ore': { builder: types.DoubleOrdOre, ColumnClass: EncryptedDoubleOrdOreColumn, castAs: 'number', capabilities: ORD, indexes: ORE_IDX, samples: DOUBLE_S, errorSamples: NUM_ERR },
256+
'eql_v3.double_ord': { builder: types.DoubleOrd, ColumnClass: EncryptedDoubleOrdColumn, castAs: 'number', capabilities: ORD, indexes: ORE_IDX, samples: DOUBLE_S, errorSamples: NUM_ERR },
257257
} as const satisfies Record<EqlV3TypeName, DomainSpec>

packages/stack/__tests__/v3-matrix/matrix-live-pg.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ const sql = LIVE_EQL_V3_PG_ENABLED
6363
const TABLE_NAME = 'v3_matrix_live_pg'
6464
const TEST_RUN_ID = `matrix-live-pg-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`
6565

66-
/** `eql_v3.int4_ord` -> `int4_ord`: a valid, unique Postgres column name. */
66+
/** `eql_v3.integer_ord` -> `integer_ord`: a valid, unique Postgres column name. */
6767
const slug = (t: EqlV3TypeName): string => t.replace('eql_v3.', '')
6868

6969
const expectDecryptedStorageValue = (

packages/stack/__tests__/v3-matrix/matrix-live.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import {
2929
V3_MATRIX,
3030
} from './catalog'
3131

32-
/** `eql_v3.int4_ord` -> `int4_ord`: a valid, per-domain-unique column name. */
32+
/** `eql_v3.integer_ord` -> `integer_ord`: a valid, per-domain-unique column name. */
3333
const slug = (t: EqlV3TypeName): string => t.replace('eql_v3.', '')
3434

3535
// `as const satisfies Record<...>` gives `V3_MATRIX` a narrower type than

packages/stack/__tests__/v3-matrix/matrix.test-d.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ import { type EqlV3TypeName, V3_MATRIX } from './catalog'
2222
// One mixed-tier table spanning every capability tier + plaintext axis, built
2323
// from the catalog's own builders.
2424
const records = encryptedTable('records', {
25-
count: V3_MATRIX['eql_v3.int4'].builder('count'), // number, storage-only
26-
score: V3_MATRIX['eql_v3.int4_eq'].builder('score'), // number, equality
27-
rank: V3_MATRIX['eql_v3.int4_ord'].builder('rank'), // number, order + range
25+
count: V3_MATRIX['eql_v3.integer'].builder('count'), // number, storage-only
26+
score: V3_MATRIX['eql_v3.integer_eq'].builder('score'), // number, equality
27+
rank: V3_MATRIX['eql_v3.integer_ord'].builder('rank'), // number, order + range
2828
createdAt: V3_MATRIX['eql_v3.timestamp_ord'].builder('created_at'), // date
2929
email: V3_MATRIX['eql_v3.text_search'].builder('email'), // string, full-text
3030
active: V3_MATRIX['eql_v3.bool'].builder('active'), // boolean, storage-only
@@ -67,12 +67,13 @@ describe('eql_v3 type-driven matrix (types)', () => {
6767
type Queryable = QueryableColumnsOf<typeof records>
6868

6969
// A queryable column is a member of the set...
70-
const ok: Queryable = V3_MATRIX['eql_v3.int4_eq'].builder('score')
70+
const ok: Queryable = V3_MATRIX['eql_v3.integer_eq'].builder('score')
7171
expectTypeOf(ok).toExtend<Queryable>()
7272

7373
// ...but a storage-only column is not.
7474
// @ts-expect-error - storage-only integer column is excluded from QueryableColumnsOf
75-
const _notQueryable: Queryable = V3_MATRIX['eql_v3.int4'].builder('count')
75+
const _notQueryable: Queryable =
76+
V3_MATRIX['eql_v3.integer'].builder('count')
7677

7778
// @ts-expect-error - storage-only boolean column is excluded from QueryableColumnsOf
7879
const _boolNotQueryable: Queryable =

packages/stack/src/eql/v3/columns.ts

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -111,43 +111,43 @@ export const TEXT_SEARCH_EQL_TYPE = 'eql_v3.text_search'
111111
// Exported for the `types` namespace factory (see ./types); they are internal
112112
// building blocks and are intentionally NOT re-exported from the public barrel.
113113
export const INTEGER = {
114-
eqlType: 'eql_v3.int4',
114+
eqlType: 'eql_v3.integer',
115115
castAs: 'number',
116116
capabilities: STORAGE_ONLY,
117117
} as const
118118
export const INTEGER_EQ = {
119-
eqlType: 'eql_v3.int4_eq',
119+
eqlType: 'eql_v3.integer_eq',
120120
castAs: 'number',
121121
capabilities: EQUALITY_ONLY,
122122
} as const
123123
export const INTEGER_ORD_ORE = {
124-
eqlType: 'eql_v3.int4_ord_ore',
124+
eqlType: 'eql_v3.integer_ord_ore',
125125
castAs: 'number',
126126
capabilities: ORDER_AND_RANGE,
127127
} as const
128128
export const INTEGER_ORD = {
129-
eqlType: 'eql_v3.int4_ord',
129+
eqlType: 'eql_v3.integer_ord',
130130
castAs: 'number',
131131
capabilities: ORDER_AND_RANGE,
132132
} as const
133133

134134
export const SMALLINT = {
135-
eqlType: 'eql_v3.int2',
135+
eqlType: 'eql_v3.smallint',
136136
castAs: 'number',
137137
capabilities: STORAGE_ONLY,
138138
} as const
139139
export const SMALLINT_EQ = {
140-
eqlType: 'eql_v3.int2_eq',
140+
eqlType: 'eql_v3.smallint_eq',
141141
castAs: 'number',
142142
capabilities: EQUALITY_ONLY,
143143
} as const
144144
export const SMALLINT_ORD_ORE = {
145-
eqlType: 'eql_v3.int2_ord_ore',
145+
eqlType: 'eql_v3.smallint_ord_ore',
146146
castAs: 'number',
147147
capabilities: ORDER_AND_RANGE,
148148
} as const
149149
export const SMALLINT_ORD = {
150-
eqlType: 'eql_v3.int2_ord',
150+
eqlType: 'eql_v3.smallint_ord',
151151
castAs: 'number',
152152
capabilities: ORDER_AND_RANGE,
153153
} as const
@@ -248,43 +248,43 @@ export const BOOLEAN = {
248248
} as const
249249

250250
export const REAL = {
251-
eqlType: 'eql_v3.float4',
251+
eqlType: 'eql_v3.real',
252252
castAs: 'number',
253253
capabilities: STORAGE_ONLY,
254254
} as const
255255
export const REAL_EQ = {
256-
eqlType: 'eql_v3.float4_eq',
256+
eqlType: 'eql_v3.real_eq',
257257
castAs: 'number',
258258
capabilities: EQUALITY_ONLY,
259259
} as const
260260
export const REAL_ORD_ORE = {
261-
eqlType: 'eql_v3.float4_ord_ore',
261+
eqlType: 'eql_v3.real_ord_ore',
262262
castAs: 'number',
263263
capabilities: ORDER_AND_RANGE,
264264
} as const
265265
export const REAL_ORD = {
266-
eqlType: 'eql_v3.float4_ord',
266+
eqlType: 'eql_v3.real_ord',
267267
castAs: 'number',
268268
capabilities: ORDER_AND_RANGE,
269269
} as const
270270

271271
export const DOUBLE = {
272-
eqlType: 'eql_v3.float8',
272+
eqlType: 'eql_v3.double',
273273
castAs: 'number',
274274
capabilities: STORAGE_ONLY,
275275
} as const
276276
export const DOUBLE_EQ = {
277-
eqlType: 'eql_v3.float8_eq',
277+
eqlType: 'eql_v3.double_eq',
278278
castAs: 'number',
279279
capabilities: EQUALITY_ONLY,
280280
} as const
281281
export const DOUBLE_ORD_ORE = {
282-
eqlType: 'eql_v3.float8_ord_ore',
282+
eqlType: 'eql_v3.double_ord_ore',
283283
castAs: 'number',
284284
capabilities: ORDER_AND_RANGE,
285285
} as const
286286
export const DOUBLE_ORD = {
287-
eqlType: 'eql_v3.float8_ord',
287+
eqlType: 'eql_v3.double_ord',
288288
castAs: 'number',
289289
capabilities: ORDER_AND_RANGE,
290290
} as const

packages/stack/src/eql/v3/types.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,13 @@ import {
7474
* The v3 column-type namespace. Each member is a public, semantic factory name
7575
* for a concrete EQL v3 column. Most members mirror the underlying domain name;
7676
* JS-friendly scalar names map to Postgres concrete domains, e.g.
77-
* `types.IntegerOrd` builds an `eql_v3.int4_ord` column and `types.Boolean`
77+
* `types.IntegerOrd` builds an `eql_v3.integer_ord` column and `types.Boolean`
7878
* builds an `eql_v3.bool` column.
7979
*
80+
* If these factory names stop matching the emitted capability/domain surface,
81+
* the stack package is out of sync with the underlying EQL build. That is a
82+
* version mismatch, not a harmless naming drift.
83+
*
8084
* Each factory returns the CONCRETE column class instance (never the widened
8185
* `AnyEncryptedV3Column`) so per-column plaintext / query-capability inference
8286
* stays precise.

0 commit comments

Comments
 (0)