1.0.1 • Published 2 years ago
@rugo-vn/db v1.0.1
Rugo DB
@rugo-vn/db
Naming Convention
- DO NOT naming property likes:
_id,id,sort,skip,limit,page. - Based MongoDB, it provides structured data model, but still flexible.
- Each collection is called
table, entity to struct table calledschema. - Each document is called
row, document's key calledfield. - Schema of each field called
definition.
Settings
const settings = {
uri: /* optional, mongo db connection string */,
}Actions
find
Return: (type: object)
data(type:array) list of result rowsmeta(type:object) pagination info.meta.limit(type:number) page size, limit size.meta.total(type:number) total of row.meta.skip(type:number) skipped rows.meta.page(type:number) current page (started by1).meta.npage(type:number) number of pages, total pages.
create
Return:
- (type:
object) created row
update
Return:
- (type:
object) updated row
remove
Return:
- (type:
object) removed row
License
MIT
1.1.0-beta.2
2 years ago
1.1.0-beta.1
2 years ago
1.0.1
3 years ago
1.1.0-beta.0
3 years ago
1.0.1-beta.2
3 years ago
1.0.1-beta.1
3 years ago
1.0.0
3 years ago