mirror of
https://github.com/Kaelio/ktx.git
synced 2026-07-04 10:52:13 +02:00
refactor(cli): use dialect display parsing for entity details
This commit is contained in:
parent
f000221f78
commit
70a59c8c01
2 changed files with 30 additions and 49 deletions
|
|
@ -201,6 +201,22 @@ describe('createKtxEntityDetailsService', () => {
|
|||
});
|
||||
});
|
||||
|
||||
it('resolves quoted qualified display strings through the dialect parser', async () => {
|
||||
await seedScan({ syncId: 'sync-1', runId: 'scan-1' });
|
||||
const service = createKtxEntityDetailsService(project);
|
||||
|
||||
const result = await service.read({
|
||||
connectionId: 'warehouse',
|
||||
entities: [{ table: '"public"."orders"' }],
|
||||
});
|
||||
|
||||
expect(result.results[0]).toMatchObject({
|
||||
ok: true,
|
||||
display: 'public.orders',
|
||||
tableRef: { catalog: null, db: 'public', name: 'orders' },
|
||||
});
|
||||
});
|
||||
|
||||
it('filters requested columns while keeping full-table foreign keys', async () => {
|
||||
await seedScan({ syncId: 'sync-1', runId: 'scan-1' });
|
||||
const service = createKtxEntityDetailsService(project);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue