sea-orm icon indicating copy to clipboard operation
sea-orm copied to clipboard

feat: Add TypeScript type annotations for PgVector columns

Open mansiverma897993 opened this issue 7 months ago • 1 comments

  • Add get_ts_type_attrs method to Column to generate #[ts(type = "number[]")] or #[specta(type = "number[]")] attributes for PgVector fields when ts_rs::TS or specta::Type derives are present
  • Update all entity writers (compact, dense, expanded, frontend) to emit TS type attributes for vector columns
  • Add regression tests to ensure TS attributes are generated correctly
  • This fixes the issue where PgVector fields were not properly typed in generated TypeScript definitions

PR Info

  • Closes
  • Dependencies:
  • Dependents:

New Features

  • [ ]

Bug Fixes

  • [ ]

Breaking Changes

  • [ ]

Changes

  • [ ]

mansiverma897993 avatar Apr 08 '26 10:04 mansiverma897993

Should this be fixed in codegen? Are there any limitations that prevent adding PgVector support in ts_rs and specta?

Huliiiiii avatar Apr 08 '26 11:04 Huliiiiii