@nestjs-odata/typeorm 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,58 @@
1
+ # @nestjs-odata/typeorm
2
+
3
+ TypeORM adapter for [@nestjs-odata/core](https://www.npmjs.com/package/@nestjs-odata/core) — auto-derives OData EDM from TypeORM entity metadata with zero double-declaration.
4
+
5
+ [![npm version](https://img.shields.io/npm/v/@nestjs-odata/typeorm.svg)](https://www.npmjs.com/package/@nestjs-odata/typeorm)
6
+ [![npm downloads](https://img.shields.io/npm/dm/@nestjs-odata/typeorm.svg)](https://www.npmjs.com/package/@nestjs-odata/typeorm)
7
+ [![license](https://img.shields.io/npm/l/@nestjs-odata/typeorm.svg)](https://github.com/cberd1509/nestjs-odata/blob/main/LICENSE)
8
+
9
+ ## Features
10
+
11
+ - Auto-derives OData EDM from TypeORM `@Entity` / `@Column` decorators — no separate OData schema
12
+ - Translates OData `$filter`, `$select`, `$expand`, `$orderby`, `$top`, `$skip` to TypeORM QueryBuilder
13
+ - Built-in CRUD operations via `TypeOrmODataController`
14
+ - Works alongside regular NestJS/TypeORM routes — no lock-in
15
+
16
+ ## Installation
17
+
18
+ ```bash
19
+ pnpm add @nestjs-odata/core @nestjs-odata/typeorm reflect-metadata
20
+ ```
21
+
22
+ ## Quick Start
23
+
24
+ ```typescript
25
+ import { Entity, PrimaryGeneratedColumn, Column } from 'typeorm'
26
+ import { ODataEntity } from '@nestjs-odata/core'
27
+ import { TypeOrmODataController } from '@nestjs-odata/typeorm'
28
+
29
+ @ODataEntity()
30
+ @Entity()
31
+ export class Product {
32
+ @PrimaryGeneratedColumn()
33
+ id: number
34
+
35
+ @Column()
36
+ name: string
37
+
38
+ @Column('decimal')
39
+ price: number
40
+ }
41
+
42
+ // Controller — inherits GET /odata/Products, $filter, $top, $skip, etc.
43
+ @Controller()
44
+ export class ProductsController extends TypeOrmODataController(Product) {}
45
+ ```
46
+
47
+ ## Documentation
48
+
49
+ Full documentation, guides, and API reference:
50
+ **https://cberd1509.github.io/nestjs-odata/**
51
+
52
+ ## Repository
53
+
54
+ https://github.com/cberd1509/nestjs-odata
55
+
56
+ ## License
57
+
58
+ MIT