October 2022 Summaries
2 posts from Gel Data
Filter
Month:
Year:
Post Summaries
Back to Blog
The EdgeDB team has released v1.0 versions of their client libraries for JavaScript and Python, which include code generation features. This enables developers to write strongly typed queries in a DRY manner without sacrificing performance. The new mechanism allows users to generate typesafe code directly from their EdgeQL queries. The official client libraries for JavaScript/TypeScript, Python, and Dart have been updated to support this workflow, with the .NET client coming soon. Code generation is supported for Node.js, Deno, Python, and Dart, each with its own specific workflow. Additionally, the EdgeDB team has provided tools to make it easier to build third-party code generators using their JavaScript/TypeScript client.
Oct 21, 2022
864 words in the original blog post.
As the use of statically typed languages increases, developers face the challenge of executing database queries in a typesafe manner, often opting for ORM libraries despite performance tradeoffs. EdgeDB addresses this by enabling typesafe code generation directly from EdgeQL queries, combining the benefits of both static typing and dynamic querying. This is achieved by converting EdgeQL queries into typed functions via updated client libraries for JavaScript/TypeScript, Python, and Dart, with .NET support forthcoming. The process involves detecting EdgeQL files, sending their contents to an EdgeDB instance, receiving detailed type descriptions, and generating source files with typed functions. This allows developers to write queries in EdgeQL and have them converted to language-native forms, ensuring input types and return types are enforced at compile-time. The workflow varies slightly across languages, with support for features like single-file mode and watch mode, and tools are provided for building custom code generators, enhancing flexibility and integration with various ecosystems.
Oct 21, 2022
1,005 words in the original blog post.