diff --git a/CHANGELOG.md b/CHANGELOG.md index ffa1a2ba..85ade845 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ This project adheres to [Semantic Versioning](http://semver.org/). The format is based on [Keep a Changelog](http://keepachangelog.com/). ## Version 0.19.0 - TBD +### Added +- Support for `cds.Vector`, which will be represented as `string` ## Version 0.18.2 - 2024-03-21 ### Fix diff --git a/lib/components/resolver.js b/lib/components/resolver.js index 897fe300..1b7712a6 100644 --- a/lib/components/resolver.js +++ b/lib/components/resolver.js @@ -45,6 +45,7 @@ const Builtins = { Binary: 'string', LargeString: 'string', LargeBinary: 'Buffer | string | {value: import("stream").Readable, $mediaContentType: string, $mediaContentDispositionFilename?: string, $mediaContentDispositionType?: string}', + Vector: 'string', Integer: 'number', UInt8: 'number', Int16: 'number', diff --git a/test/unit/files/builtins/model.cds b/test/unit/files/builtins/model.cds index 21de565c..2f51ead7 100644 --- a/test/unit/files/builtins/model.cds +++ b/test/unit/files/builtins/model.cds @@ -4,6 +4,7 @@ entity E { uuid: UUID; str: String; bin: Binary; + // vec: Vector(123); lstr: LargeString; lbin: LargeBinary; integ: Integer; diff --git a/test/unit/output.test.js b/test/unit/output.test.js index c05bd093..444731ba 100644 --- a/test/unit/output.test.js +++ b/test/unit/output.test.js @@ -108,6 +108,7 @@ describe('Compilation', () => { expect(astw.exists('_EAspect', 'uuid', m => check.isNullable(m.type, [check.isString]))).toBeTruthy() expect(astw.exists('_EAspect', 'str', m => check.isNullable(m.type, [check.isString]))).toBeTruthy() expect(astw.exists('_EAspect', 'bin', m => check.isNullable(m.type, [check.isString]))).toBeTruthy() + // expect(astw.exists('_EAspect', 'vec', m => check.isNullable(m.type, [check.isString]))).toBeTruthy() expect(astw.exists('_EAspect', 'lstr', m => check.isNullable(m.type, [check.isString]))).toBeTruthy() expect(astw.exists('_EAspect', 'lbin', m => check.isUnionType(m.type, [ st => st.full === 'Buffer',