You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 0a902b0
Browse filesBrowse the repository at this point in the historyBrowse files
feat(spec): an Oracle RAW(16) uuid column backs a reference field exactly again
The SQL driver now binds a RAW(16) comparand, written value and by-id
key through HEXTORAW, so the oracle uuid demotion narrows to the text
pairing alone: lookup, master_detail and user answer exact; text stays
lossy because its pattern operators match the column's hex text.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jULf9M1RFFq4dq9ioH
feat(spec): an Oracle `RAW(16)` uuid column backs a `lookup`, `master_detail` or `user` field exactly again; its `text` pairing stays lossy
6
+
7
+
Clause-②: yes (widening)
8
+
Metadata-protocol: semantic
9
+
10
+
`isCompatible(rawType, fieldType, 'oracle')` now answers `true` instead of `'lossy'` for a `RAW(16)` column against `lookup`, `master_detail` and `user`. The SQL driver binds a comparison value, a written value and a by-id key for a `RAW(16)` column as `HEXTORAW(?)`, so a reference field over a `SYS_GUID()` key is filtered, written and resolved by the uuid string it reads. Before that bind existed, every pairing over the column was judged `'lossy'`.
11
+
12
+
What a caller sees:
13
+
14
+
-**Draft and validation.** A field of those three types over a `RAW(16)` column is no longer reported as a `type_mismatch` warning by object validation.
15
+
-**`text` is unchanged.** A `text` field over a `RAW(16)` column still answers `'lossy'`, and a draft still marks such a column for review. Its pattern operators (`$contains`, `$startsWith`, `$like` and the rest) are sent as text patterns, and Oracle compares them with the column's hex text (32 upper-case digits, no hyphens), not with the uuid string a read returns.
16
+
-**Other dialects and other `RAW` widths** answer as before.
Copy file name to clipboardExpand all lines: content/docs/data-modeling/external-datasources.mdx
+15-6Lines changed: 15 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -555,7 +555,7 @@ object whose `remoteName` is `OWNER.TABLE`.
555
555
|`DATE`|`datetime`| An Oracle `DATE` carries a time of day. A `date` field over it is judged lossy: the time is dropped. |
556
556
|`TIMESTAMP WITH TIME ZONE`|`datetime`| Compared and returned as UTC instants. |
557
557
|`CLOB`|`textarea`||
558
-
|`RAW(16)`|`text`| Read as a lower-case UUID string. Every field pairing over it is judged lossy, so a draft marks it for review: it cannot be filtered or written by that string yet (see below). |
558
+
|`RAW(16)`|`text`| Read as a lower-case UUID string, and filtered and written by that string (see below). A `lookup`, `master_detail` or `user` field over it is exact. A `text` field is judged lossy, so a draft marks it for review: `$contains` and the other pattern operators do not match it as the string it reads. |
559
559
560
560
The driver pins every session to UTC. Thin mode decodes `DATE` and `TIMESTAMP`
561
561
values with the server process's local clock, and the driver repairs that on read.
@@ -573,11 +573,20 @@ the process's own time zone. Run the server with `TZ=UTC` and there is no such h
573
573
`MERGE`. Use create and update.
574
574
-**JSON-array membership** (`$contains` on a multi-value field) is refused. There is
575
575
no Oracle construct modelled for it.
576
-
-**Filtering or writing a `RAW(16)` column by its UUID string is not supported.**
577
-
The driver presents the value as a string on read, but it does not convert the
578
-
string back to `RAW` for a comparison or a write. This includes a `lookup` keyed
579
-
by a `SYS_GUID()` column. Binding through `HEXTORAW` is tracked in
**Amended by**: [ADR-0143](./0143-outbound-connector-auth-is-open-tier.md) (2026-10-27), attribution only — see the note below. D7 (2026-10-29, ruling 6486136301 on #27298) — an API-backed datasource may borrow a declared connector instance's credential through `external.connector`; see the D7 note below. #27688 (2026-10-30), example only — §8's `credentialsRef` is a `sys_secret:` handle, the only form the shipped secret binder resolves; see the note under §8. #27917 (2026-10-30), dialect list only — §4.6 names the `odata` vocabulary the matrix gained with #27745. #28208 (2026-10-31, ruling 6525963988 on #27687) — a datasource defined in code reads its credential at connect from `OS_DATASOURCE_<NAME>_PASSWORD`, behind the host switch `OS_DATASOURCE_ENV_CREDENTIALS`; see the note under §10 and the correction in the D7 note. 2026-11-03 (maintainer ruling in the security channel, D1 = B, D2 = (c2)+(a)) — under a walled tenancy posture every external object states its organization scope, or the boot is refused by name; see the note under §10 and the sentence added to the D7 note. #31328 (2026-11-08) — §4.6 names the `oracle` vocabulary, with how `NUMBER(p,s)` and `RAW(16)` are read, and its federation-only scope; §5.1 gains the federation-only arm of the DDL gate. #31327 (2026-11-08) — a second federation-only driver, SQL Server (`mssql`): §4.6 names the `mssql` vocabulary and its one dialect-only lossy rule, and the two dialects' lossy moves share one table; §5.1's federation-only arm names both drivers.
7
+
**Amended by**: [ADR-0143](./0143-outbound-connector-auth-is-open-tier.md) (2026-10-27), attribution only — see the note below. D7 (2026-10-29, ruling 6486136301 on #27298) — an API-backed datasource may borrow a declared connector instance's credential through `external.connector`; see the D7 note below. #27688 (2026-10-30), example only — §8's `credentialsRef` is a `sys_secret:` handle, the only form the shipped secret binder resolves; see the note under §8. #27917 (2026-10-30), dialect list only — §4.6 names the `odata` vocabulary the matrix gained with #27745. #28208 (2026-10-31, ruling 6525963988 on #27687) — a datasource defined in code reads its credential at connect from `OS_DATASOURCE_<NAME>_PASSWORD`, behind the host switch `OS_DATASOURCE_ENV_CREDENTIALS`; see the note under §10 and the correction in the D7 note. 2026-11-03 (maintainer ruling in the security channel, D1 = B, D2 = (c2)+(a)) — under a walled tenancy posture every external object states its organization scope, or the boot is refused by name; see the note under §10 and the sentence added to the D7 note. #31328 (2026-11-08) — §4.6 names the `oracle` vocabulary, with how `NUMBER(p,s)` and `RAW(16)` are read, and its federation-only scope; §5.1 gains the federation-only arm of the DDL gate. #31327 (2026-11-08) — a second federation-only driver, SQL Server (`mssql`): §4.6 names the `mssql` vocabulary and its one dialect-only lossy rule, and the two dialects' lossy moves share one table; §5.1's federation-only arm names both drivers. #31592 (2026-11-09) — §4.6: with the `HEXTORAW` bind of #31390 on `main`, an Oracle `RAW(16)` column backs a `lookup`, `master_detail` or `user` field exactly again; only its `text` pairing stays `'lossy'`.
8
8
9
9
> **Amendment note D7 (2026-10-29, ruling 6486136301, letter A) — a second credential channel.**
10
10
> §10 says credentials reach a datasource only through `credentialsRef`. That stays true for a
@@ -429,9 +429,11 @@ read before the matrix strips them (SQL Server's `(max)` length does not: an
429
429
integral `NUMBER(p)` / `NUMBER(p,0)` (a negative scale counts its `p − s`
430
430
digits) is `integer` up to nine digits and `bigint` beyond, `NUMBER(*,0)` —
431
431
Oracle's `INTEGER` — included; a bare `NUMBER` is `decimal`. `RAW(16)` is
432
-
`uuid`, any other `RAW``binary`; on `oracle` every pairing over that `uuid` is
433
-
judged `'lossy'`, not exact, because the driver reads it as a UUID string but
434
-
cannot yet bind that string back to `RAW` for a filter or a write (#31390). `DATE` carries a time of day, so it is
432
+
`uuid`, any other `RAW``binary`. The driver reads it as a UUID string and binds
433
+
that string back through `HEXTORAW` for a comparison, a write and a by-id key
434
+
(#31390), so a `lookup`, `master_detail` or `user` field over it is exact; a
435
+
`text` field over it stays `'lossy'` on `oracle`, because its pattern operators
436
+
match the column's hex text, not the string it reads. `DATE` carries a time of day, so it is
435
437
`datetime`. A pre-23ai flag column (`NUMBER(1)` / `CHAR(1)`) is judged as the
436
438
integer or text it is, never coerced to `boolean`. The `oracle` and `mssql` driver ids
437
439
serve federation only: a datasource naming either with `schemaMode: 'managed'`
@@ -443,7 +445,7 @@ sync would have nothing to send.
443
445
names, and maps `timestamp` to binary, because on SQL Server it is the
444
446
`rowversion` counter and not a date-time. A dialect moves a pairing to
445
447
`'lossy'` in one table, `DIALECT_LOSSY_RULES`, and only ever toward `'lossy'`:
446
-
`oracle` demotes the exact pairings of `uuid` (above), and `mssql` adds one, a
448
+
`oracle` demotes the exact `text` pairing of `uuid` (above), and `mssql` adds one, a
447
449
text column backing a `json`, `tags` or `multiselect` field, because SQL Server
448
450
keeps JSON in `nvarchar(max)` and the SQL driver stores those fields there as
0 commit comments