Skip to content

test: distinguish UUID and GUID key types - #332

Open
elpete wants to merge 1 commit into
nextfrom
test/80-uuid-guid-key-types
Open

test: distinguish UUID and GUID key types#332
elpete wants to merge 1 commit into
nextfrom
test/80-uuid-guid-key-types

Conversation

@elpete

@elpete elpete commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator

Closes #80

Review

Distinguishing CFML UUIDs from standard GUIDs is a good fit for Quick because key generation must match qb's schema column type exactly.

Recommendation: 10/10.

Reasons for

  • Prevents generated key truncation or incompatible database values.
  • Gives explicit, portable intent: UUIDKeyType pairs with qb uuid, while GUIDKeyType pairs with qb guid.
  • Both values are assigned before insert and work through ordinary Quick persistence.
  • Exact format tests are inexpensive.

Reasons against

  • The similar names remain easy to confuse without clear documentation.
  • GUID support can vary by CFML engine; the existing GUID integration spec retains its engine guard.

Attempted reproduction

The requested adjustment is already implemented on current next:

  • UUIDKeyType uses createUUID(), matching qb's 35-character uuid column.
  • GUIDKeyType uses createGUID(), matching qb's 36-character guid column.

The existing tests only asserted that generated keys were non-numeric, which would not detect the original type ambiguity. This PR verifies the exact UUID/GUID shapes and confirms each generated key can be found again through the normal Quick API.

Validation

  • Focused UUID/GUID specs: 2 passed, 0 failed, 0 errors
  • Full suite: 495 passed, 0 failed, 0 errors, 3 skipped
  • Formatter completed
  • git diff --check passed
  • Tested with qb@14.0.0-beta.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant