myorm_pg 1.0.6 → 1.1.1
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 +3 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -12,10 +12,7 @@ npm install myorm_pg
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
## Usage
|
|
15
|
-
|
|
16
|
-
After that we need create a class "Context" that will extends the abstract class __PGDBContext__.
|
|
17
|
-
After that, we need to create all PGDBSets<T> that will need to work with ours mapped types.
|
|
18
|
-
Finally, in the application start, we need call the method __PGDBContext.UpdateDatabaseAsync()__.
|
|
15
|
+
This ORM is based on https://www.nuget.org/packages/Adr.MyORMForPostgreSQL for .NET. The usage is similar.
|
|
19
16
|
|
|
20
17
|
### ./entities/Person.ts
|
|
21
18
|
|
|
@@ -29,7 +26,7 @@ export class Person
|
|
|
29
26
|
@PrimaryKey()
|
|
30
27
|
@Column()
|
|
31
28
|
@DataType(DBTypes.SERIAL)
|
|
32
|
-
public Id : number
|
|
29
|
+
public Id : number;
|
|
33
30
|
|
|
34
31
|
@Column()
|
|
35
32
|
public Name : string;
|
|
@@ -70,6 +67,7 @@ export class Person
|
|
|
70
67
|
|
|
71
68
|
constructor(name : string = "", email : string = "", age : number = 1)
|
|
72
69
|
{
|
|
70
|
+
this.Id = -1;
|
|
73
71
|
this.Name = name;
|
|
74
72
|
this.Email = email;
|
|
75
73
|
this.Age = age;
|