knox / TypeORM-readme-11.sh
0 likes
0 forks
1 files
Last active
1 | cd MyProject |
2 | npm install |
knox / TypeORM-readme-10.txt
0 likes
0 forks
1 files
Last active
1 | MyProject |
2 | ├── src // place of your TypeScript code |
3 | │ ├── entity // place where your entities (database models) are stored |
4 | │ │ └── User.ts // sample entity |
5 | │ ├── migration // place where your migrations are stored |
6 | │ ├── data-source.ts // data source and all connection configuration |
7 | │ └── index.ts // start point of your application |
8 | ├── .gitignore // standard gitignore file |
9 | ├── package.json // node module dependencies |
10 | ├── README.md // simple readme file |
knox / TypeORM-readme-9.sh
0 likes
0 forks
1 files
Last active
1 | npx typeorm init --name MyProject --database postgres |
knox / TypeORM-readme-8.json
0 likes
0 forks
1 files
Last active
1 | "emitDecoratorMetadata": true, |
2 | "experimentalDecorators": true, |
knox / TypeORM-readme-7.sh
0 likes
0 forks
1 files
Last active
1 | # Linux/macOS |
2 | export SPANNER_EMULATOR_HOST=localhost:9010 |
3 | |
4 | # Windows |
5 | set SPANNER_EMULATOR_HOST=localhost:9010 |
knox / TypeORM-readme-6.sh
0 likes
0 forks
1 files
Last active
1 | # Linux/macOS |
2 | export GOOGLE_APPLICATION_CREDENTIALS="KEY_PATH" |
3 | |
4 | # Windows |
5 | set GOOGLE_APPLICATION_CREDENTIALS=KEY_PATH |
6 | |
7 | # Replace KEY_PATH with the path of the JSON file that contains your service account key. |
knox / TypeORM-readme-5.sh
0 likes
0 forks
1 files
Last active
1 | npm install @google-cloud/spanner --save |
knox / TypeORM-readme-5.sh
0 likes
0 forks
1 files
Last active
1 | npm install @sap/hana-client |
2 | npm install hdb-pool |
knox / TypeORM-readme-4.ts
0 likes
0 forks
1 files
Last active
1 | const user = new User() |
2 | user.firstName = "Timber" |
3 | user.lastName = "Saw" |
4 | user.age = 25 |
5 | await user.save() |
6 | |
7 | const allUsers = await User.find() |
8 | const firstUser = await User.findOneBy({ |
9 | id: 1, |
10 | }) |