fix(core): update

This commit is contained in:
2020-08-18 12:01:46 +00:00
parent 72894e3ef1
commit 0203eabdfd
10 changed files with 7706 additions and 1587 deletions

View File

@@ -54,7 +54,7 @@ import * as smartdata from 'smartdata';
const smartdataDb = new smartdata.SmartdataDb({
mongoDbUrl: '//someurl',
mongoDbName: 'myDatabase',
mongoDbPass: 'mypassword'
mongoDbPass: 'mypassword',
});
smartdataDb.connect();
@@ -87,14 +87,14 @@ class MyObject extends smartdata.DbDoc<MyObject> {
const localObject = new MyObject({
property1: 'hi',
property2: 2
property2: 2,
});
localObject.save(); // saves the object to the database
// start retrieving instances
MyObject.getInstance<MyObject>({
property: 'hi'
property: 'hi',
}); // outputs a new instance of MyObject with the values from db assigned
```
@@ -134,7 +134,6 @@ Since you define your classes in TypeScript and types flow through smartdata in
you should get all the Intellisense and type checking you love when using smartdata.
smartdata itself also bundles typings. You don't need to install any additional types for smartdata.
## Contribution
We are always happy for code contributions. If you are not the code contributing type that is ok. Still, maintaining Open Source repositories takes considerable time and thought. If you like the quality of what we do and our modules are useful to you we would appreciate a little monthly contribution: You can [contribute one time](https://lossless.link/contribute-onetime) or [contribute monthly](https://lossless.link/contribute). :)