sebastianwessel / surrealdb-client-generator

Tool which generates a typescript client for SurrealDB and zod schema of a given database
MIT License
76 stars 12 forks source link

Fix handling of array of objects #20

Closed sebastianwessel closed 4 months ago

sebastianwessel commented 4 months ago

Example definition

DEFINE FIELD vendors ON TABLE book TYPE array<object> DEFAULT [];
DEFINE FIELD vendors[*].name ON TABLE book TYPE string;
DEFINE FIELD vendors[*].price ON TABLE book TYPE number;

Currently, nested field names are not handled correctly.

See: https://github.com/sebastianwessel/surrealdb-client-generator/issues/12#issuecomment-2164989809