terence410 / ts-datastore-orm Goto Github PK
View Code? Open in Web Editor NEWts-datastore-orm targets to provide a strong typed and structural ORM feature for Datastore (Firestore in Datastore mode).
License: MIT License
ts-datastore-orm targets to provide a strong typed and structural ORM feature for Datastore (Firestore in Datastore mode).
License: MIT License
I couldn't find any example for referencing an entity from another entity. Are relationships supported? Things like One-To-Many, Many-To-Many etc.
If not, is this something that is planned?
I have a use case to modify the entity date before insert. For example, generate a createdAt, lastModified. It would be easy for me to use hook to auto modify entity.
ts-datastore-orm/src/Repository.ts
Lines 325 to 329 in dee4c79
Curious if this is already possible with the current setup or if I can update the docs to do so?
https://cloud.google.com/datastore/docs/tools/datastore-emulator
I came across this problem:
Should I set all properties as required and set a default empty state (empty string, 0, etc) or set all as nullable (with ?: operator)?
Or am I missing something about typescript? ๐ค
Hi @terence410
first of all - a big thank you for writing and providing this package to the public. I know of the work behind an open source project - no matter of its size - a lot of work comes with the smallest projects.
The first things I've asked myself are the following:
Best regards
/ben
If I have something like
class A extends BaseEntity {
@Column({ index: true })
public id: string = '';
}
class B extends A {
...
}
@Entity({ kind: 'c' })
class C extends B {
...
}
it throws an error (C) Entity must define an id column.
I think this is caused by only checking first subclass and not all possible subclasses, here:
ts-datastore-orm/src/decorators/Entity.ts
Lines 33 to 44 in 4e3868c
I know Google has Datastore and then what they call Firestore. I don't quite understand the difference, but is this library compatible with both?
I found this library really cool, but it is lacking of API documentation, and hard to know the purpose of each API, e.g., the meaning of generateId
, _id
.
Warning:
(node:78064) Warning: Providing Filter objects like Composite Filter or Property Filter is recommended when using .filter
More info here:
googleapis/nodejs-datastore#1109 (comment)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.