Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
f39703b8d9 | |||
fa1951b4dd |
@ -27,6 +27,8 @@ let myDb2 = new smartdata.Db('someConnectionUrl')
|
|||||||
|
|
||||||
myDb1.connect()
|
myDb1.connect()
|
||||||
myDb2.connect()
|
myDb2.connect()
|
||||||
|
|
||||||
|
// continues in next block...
|
||||||
```
|
```
|
||||||
|
|
||||||
### class Collection
|
### class Collection
|
||||||
@ -35,14 +37,16 @@ A collection is defined by the object class (that is extending smartdata.dbdoc)
|
|||||||
|
|
||||||
So to get to get access to a specific collection you document
|
So to get to get access to a specific collection you document
|
||||||
```typescript
|
```typescript
|
||||||
class myObject extends DbDoc {
|
// continues from the block before...
|
||||||
|
|
||||||
|
class myObject extends smartdata.DbDoc {
|
||||||
property1:string
|
property1:string
|
||||||
property2:number
|
property2:number
|
||||||
constructor(optionsArg:{
|
constructor(optionsArg:{
|
||||||
queryArg?:any,
|
queryArg?:any,
|
||||||
dataArg?:{
|
dataArg?:{
|
||||||
property1:string,
|
property1:string,
|
||||||
property2:string
|
property2:number
|
||||||
}
|
}
|
||||||
}) {
|
}) {
|
||||||
super(this,optionsArg)
|
super(this,optionsArg)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "smartdata",
|
"name": "smartdata",
|
||||||
"version": "1.0.9",
|
"version": "1.0.10",
|
||||||
"description": "do more with data",
|
"description": "do more with data",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"typings": "dist/index.d.ts",
|
"typings": "dist/index.d.ts",
|
||||||
|
Reference in New Issue
Block a user