Typetta is an open-source ORM written in TypeScript that aims to allow seamless access to data in a typed fashion to all main SQL databases (MySQL, PostgreSQL, Microsoft SQL Server, SQLLite3, CockroachDB, MariaDB, Oracle e Amazon Redshift) and also to the NoSQL database MongoDB.
Typetta is pluggable into any TypeScript backend (including serverless applications and microservices) but in terms of gain we totally suggest using it in all GraphQL backends, because… we simply love GraphQL.
With Typetta everything revolves around the data model, the entities that describe the application domain and all underlying relationships between them. This model is described in standard GraphQL, using all basic concepts (scalars, types, enumerations, etc…) and some custom directives.
Starting from the model output of the domain analysis, Typetta provides a range of code generators for:
Type definitions in TypeScript language for each entity in the model.
Data Access Object (aka DAO) for each entity type that has a corresponding data source. Each DAO is an object that the developer can also query with advanced CRUD operations.
An EntityManager, a contextual object where the developer can configure each data source and retrieve the reference of any DAO.
A completely auto-generated GraphQL Endpoint with advanced CRUD operations to access and modify data.
Below is a brief description of what makes Typetta awesome:
Typetta fulfills the need of having a typed ORM connected to SQL and NoSQL databases designed with productivity and flexibility in mind.
The philosophy behind Typetta components has been to ensure ease of use and optimisation of development time, adding complexity (with direct access to data source) only when strictly needed.
In case you are still unsure, why use Typetta instead of other ORMs?
It’s the ONLY TypeScript ORM that has full support for SQL and MongoDB databases.
A very strict typing system that 100% leverages TypeScript in providing types as responses based on the requested data type.
Using standard GraphQL, you can define the model. Using this standard opens the door to a whole set of instruments and third party frameworks that are based on this standard.