{"id":14529219,"url":"https://github.com/samchon/safe-typeorm","last_synced_at":"2025-09-01T23:33:03.801Z","repository":{"id":43065348,"uuid":"329561824","full_name":"samchon/safe-typeorm","owner":"samchon","description":"TypeORM helper library enhancing safety in the compilation level","archived":true,"fork":false,"pushed_at":"2024-05-18T15:32:15.000Z","size":23446,"stargazers_count":229,"open_issues_count":3,"forks_count":14,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-24T19:42:39.466Z","etag":null,"topics":["compilation","orm","safe","sql","typeorm","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/samchon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null},"funding":{"open_collective":"safe-typeorm"}},"created_at":"2021-01-14T09:07:18.000Z","updated_at":"2024-11-24T04:16:02.000Z","dependencies_parsed_at":"2024-01-12T23:52:05.294Z","dependency_job_id":null,"html_url":"https://github.com/samchon/safe-typeorm","commit_stats":{"total_commits":113,"total_committers":3,"mean_commits":"37.666666666666664","dds":"0.33628318584070793","last_synced_commit":"df72f64f93efee7bd7784c048af6954d056e69c6"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samchon%2Fsafe-typeorm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samchon%2Fsafe-typeorm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samchon%2Fsafe-typeorm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samchon%2Fsafe-typeorm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samchon","download_url":"https://codeload.github.com/samchon/safe-typeorm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231727114,"owners_count":18417390,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["compilation","orm","safe","sql","typeorm","typescript"],"created_at":"2024-09-05T00:00:57.658Z","updated_at":"2024-12-29T10:30:23.265Z","avatar_url":"https://github.com/samchon.png","language":"TypeScript","readme":"# Safe-TypeORM\n![logo](https://raw.githubusercontent.com/samchon/safe-typeorm/master/assets/logo.png)\n\n[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/samchon/safe-typeorm/blob/master/LICENSE)\n[![npm version](https://badge.fury.io/js/safe-typeorm.svg)](https://www.npmjs.com/package/safe-typeorm)\n[![Downloads](https://img.shields.io/npm/dm/safe-typeorm.svg)](https://www.npmjs.com/package/safe-typeorm)\n[![Build Status](https://github.com/samchon/safe-typeorm/workflows/build/badge.svg)](https://github.com/samchon/safe-typeorm/actions?query=workflow%3Abuild)\n[![Guide Documents](https://img.shields.io/badge/wiki-documentation-forestgreen)](https://github.com/samchon/safe-typeorm/wiki)\n\nMake `anyorm` to be real `typeorm`.\n\n`safe-typeorm` is a helper library of `typeorm`, enhancing type safety like below:\n\n  - When writing [**SQL query**](https://github.com/samchon/safe-typeorm/wiki/Builders#joinquerybuilder),\n    - Errors would be detected in the **compilation** level\n    - **Auto Completion** would be provided\n    - **Type Hint** would be supported\n  - You can implement [**App-join**](https://github.com/samchon/safe-typeorm/wiki/Builders#appjoinbuilder) very conveniently\n  - When [**SELECT**ing for **JSON** conversion](https://github.com/samchon/safe-typeorm/wiki/Builders#jsonselectbuilder)\n    - [**App-Join**](https://github.com/samchon/safe-typeorm/wiki/Builders#appjoinbuilder) with the related entities would be automatically done\n    - Exact JSON **type** would be automatically **deduced**\n    - The **performance** would be **automatically tuned**\n\n![JoinQueryBuilder](https://raw.githubusercontent.com/samchon/safe-typeorm/master/assets/demonstrations/join-query-builder.gif)\n\n\n\n\n## Setup\n```bash\nnpm install --save typeorm@0.2\nnpm install --save safe-typeorm\n```\n\nJust install through `npm install` command.\n\nNote that, `safe-typeorm` supports only `typeorm` v0.2 yet.\n\n\n\n\n## Features\nAbout supported features, see [Guide Documents](https://github.com/samchon/safe-typeorm/wiki)\n\n  - Relationships\n    - [Preface](https://github.com/samchon/safe-typeorm/wiki/Relationships)\n    - [Belongs.ManyToOne](https://github.com/samchon/safe-typeorm/wiki/Relationships#belongsmanytoone)\n    - [Belongs.OneToOne](https://github.com/samchon/safe-typeorm/wiki/Relationships#belongsonetoone)\n    - [Has.OneToOne](https://github.com/samchon/safe-typeorm/wiki/Relationships#hasonetoone)\n    - [Has.OneToMany](https://github.com/samchon/safe-typeorm/wiki/Relationships#hasonetomany)\n    - [Has.ManyToMany](https://github.com/samchon/safe-typeorm/wiki/Relationships#hasmanytomany)\n  - Builders\n    - [Preface](https://github.com/samchon/safe-typeorm/wiki/Builders)\n    - [JoinQueryBuilder](https://github.com/samchon/safe-typeorm/wiki/Builders#joinquerybuilder)\n    - [AppJoinBuilder](https://github.com/samchon/safe-typeorm/wiki/Builders#appjoinbuilder)\n    - [JsonSelectBuilder](https://github.com/samchon/safe-typeorm/wiki/Builders#jsonselectbuilder)\n  - Insertions\n    - [initialize](https://github.com/samchon/safe-typeorm/wiki/Insertions#initialize)\n    - [InsertCollection](https://github.com/samchon/safe-typeorm/wiki/Insertions#insertcollection)\n    - [EntityUtil](https://github.com/samchon/safe-typeorm/wiki/Insertions#entityutil)\n  - Utilities\n    - [EncryptedColumn](https://github.com/samchon/safe-typeorm/wiki/Utilities#encryptedcolumn)\n    - [Paginator](https://github.com/samchon/safe-typeorm/wiki/Utilities#paginator)\n    - [Password](https://github.com/samchon/safe-typeorm/wiki/Utilities#password)\n    - [SnakeCaseStrategy](https://github.com/samchon/safe-typeorm/wiki/Utilities#snakecasestrategy)\n\n\n\n\n## Appendix\n### Typia\n[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/samchon/typia/blob/master/LICENSE)\n[![npm version](https://img.shields.io/npm/v/typia.svg)](https://www.npmjs.com/package/typia)\n[![Downloads](https://img.shields.io/npm/dm/typia.svg)](https://www.npmjs.com/package/typia)\n[![Build Status](https://github.com/samchon/typia/workflows/build/badge.svg)](https://github.com/samchon/typia/actions?query=workflow%3Abuild)\n[![Guide Documents](https://img.shields.io/badge/wiki-documentation-forestgreen)](https://github.com/samchon/typia/wiki)\n\n```typescript\n// RUNTIME VALIDATORS\nexport function is\u003cT\u003e(input: unknown | T): input is T; // returns boolean\nexport function assert\u003cT\u003e(input: unknown | T): T; // throws TypeGuardError\nexport function validate\u003cT\u003e(input: unknown | T): IValidation\u003cT\u003e; // detailed\n\n// STRICT VALIDATORS\nexport function equals\u003cT\u003e(input: unknown | T): input is T;\nexport function assertEquals\u003cT\u003e(input: unknown | T): T;\nexport function validateEquals\u003cT\u003e(input: unknown | T): IValidation\u003cT\u003e;\n\n// JSON\nexport function application\u003cT\u003e(): IJsonApplication; // JSON schema\nexport function assertParse\u003cT\u003e(input: string): T; // type safe parser\nexport function assertStringify\u003cT\u003e(input: T): string; // safe and faster\n    // +) isParse, validateParse \n    // +) stringify, isStringify, validateStringify\n```\n\n[Typia](https://github.com/samchon/typia) is a transformer library of TypeScript, supporting below features:\n\n  - Super-fast Runtime Validators\n  - Safe JSON parse and fast stringify functions\n  - JSON schema generator\n\nAll functions in `typia` require **only one line**. You don't need any extra dedication like JSON schema definitions or decorator function calls. Just call `typia` function with only one line like `typia.assert\u003cT\u003e(input)`.\n\nAlso, as `typia` performs AOT (Ahead of Time) compilation skill, its performance is much faster than other competitive libaries. For an example, when comparing validate function `is()` with other competitive libraries, `typia` is maximum **15,000x times faster** than `class-validator`.\n\n### Nestia\n[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/samchon/nestia/blob/master/LICENSE)\n[![npm version](https://img.shields.io/npm/v/@nestia/core.svg)](https://www.npmjs.com/package/@nestia/core)\n[![Downloads](https://img.shields.io/npm/dm/@nestia/core.svg)](https://www.npmjs.com/package/@nestia/core)\n[![Build Status](https://github.com/samchon/typia/workflows/build/badge.svg)](https://github.com/samchon/nestia/actions?query=workflow%3Abuild)\n[![Guide Documents](https://img.shields.io/badge/wiki-documentation-forestgreen)](https://github.com/samchon/nestia/wiki)\n\n[Nestia](https://github.com/samchon/nestia) is a set of helper libraries for `NestJS`, supporting below features:\n\n  - `@nestia/core`: **15,000x times faster** validation decorators\n  - `@nestia/sdk`: evolved **SDK** and **Swagger** generators\n    - SDK (Software Development Kit)\n      - interaction library for client developers\n      - almost same with [tRPC](https://github.com/trpc/trpc)\n  - `nestia`: just CLI (command line interface) tool\n\n![nestia-sdk-demo](https://user-images.githubusercontent.com/13158709/215004990-368c589d-7101-404e-b81b-fbc936382f05.gif)\n\n### Reactia\n\u003e Not published yet, but soon\n\n[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/samchon/reactia/blob/master/LICENSE)\n[![Build Status](https://github.com/samchon/reactia/workflows/build/badge.svg)](https://github.com/samchon/reactia/actions?query=workflow%3Abuild)\n[![Guide Documents](https://img.shields.io/badge/wiki-documentation-forestgreen)](https://github.com/samchon/reactia/wiki)\n\n[Reactia](https://github.com/samchon/reactia) is an automatic React components generator, just by analyzing TypeScript type.\n\n  - `@reactia/core`: Core Library analyzing TypeScript type\n  - `@reactia/mui`: Material UI Theme for `core` and `nest`\n  - `@reactia/nest`: Automatic Frontend Application Builder for `NestJS`\n\n![Sample](https://user-images.githubusercontent.com/13158709/199074008-46b2dd67-02be-40b1-aa0f-74ac41f3e0a7.png)\n\nWhen you want to automate an individual component, just use `@reactia/core`.\n\n```tsx\nimport ReactDOM from \"react-dom\";\n\nimport typia from \"typia\";\nimport { ReactiaComponent } from \"@reactia/core\";\nimport { MuiInputTheme } from \"@reactia/mui\";\n\nconst RequestInput = ReactiaComponent\u003cIRequestDto\u003e(MuiInputTheme());\nconst input: IRequestDto = { ... };\n\nReactDOM.render(\n    \u003cRequestInput input={input} /\u003e,\n    document.body\n);\n```\n\nOtherwise, you can fully automate frontend application development through `@reactia/nest`.\n\n```tsx\nimport React from \"react\";\nimport ReactDOM from \"react-dom\";\n\nimport { ISwagger } \"@nestia/swagger\";\nimport { MuiApplicationTheme } from \"@reactia/mui\";\nimport { ReactiaApplication } from \"@reactia/nest\";\n\n// swagger.json must be generated by @nestia/sdk\nconst swagger: ISwagger = await import(\"./swagger.json\");\nconst App: React.FC = ReactiaApplication(MuiApplicationTheme())(swagger);\n\nReactDOM.render(\n    \u003cApp /\u003e,\n    document.body\n);\n```","funding_links":["https://opencollective.com/safe-typeorm"],"categories":["Packages","Built with TypeScript","**1. Libraries**","TypeScript 工具/库/框架"],"sub_categories":["Libraries","Database","数据库"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamchon%2Fsafe-typeorm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamchon%2Fsafe-typeorm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamchon%2Fsafe-typeorm/lists"}