Skip to content

Expose descriptor metadata: name, relation, alias, owner, charSetId, subType#38

Merged
asfernandes merged 1 commit into
asfernandes:mainfrom
fdcastel:issue-37-pr
Feb 24, 2026
Merged

Expose descriptor metadata: name, relation, alias, owner, charSetId, subType#38
asfernandes merged 1 commit into
asfernandes:mainfrom
fdcastel:issue-37-pr

Conversation

@fdcastel

Copy link
Copy Markdown
Contributor

Summary

Add six new metadata fields to the Descriptor struct, populated from IMessageMetadata during statement preparation. This resolves the // FIXME: more things placeholder and provides ODBC-level metadata access without requiring consumers to use the low-level Firebird API directly.

Changes

Descriptor.h — Six new fields added to Descriptor:

Field Source (IMessageMetadata) Description
name getField() Column or parameter name
relation getRelation() Table/relation name (empty for expressions)
alias getAlias() Column alias from the SELECT list
owner getOwner() Relation owner (empty for expressions)
charSetId getCharSet() Character set ID
subType getSubType() BLOB sub-type or numeric sub-type

Statement.cpp — Fields populated in the processMetadata lambda alongside existing descriptor initialization.

test/Statement.cpp — New descriptorMetadataFields test case that:

  • Creates a table with integer, varchar, numeric, and text blob columns
  • Queries with aliases and verifies name, alias, relation, subType on output descriptors
  • Verifies input parameter descriptors have empty names/relations/aliases

Notes

Closes #37

…subType

Add six new fields to the Descriptor struct, populated from
IMessageMetadata during statement preparation. This resolves the
'FIXME: more things' placeholder and provides ODBC-level metadata
without requiring consumers to use the low-level Firebird API.

Fields use the naming requested by the maintainer:
- 'name' (from getField) instead of 'field'
- 'charSetId' (from getCharSet) instead of 'charSet'

Closes asfernandes#37
@asfernandes asfernandes merged commit 46f926e into asfernandes:main Feb 24, 2026
4 checks passed
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.

Descriptor Metadata Access: expose field, relation, alias, owner, charSet, and subType

2 participants