1.0.31 • Published 5 months ago

@reneos/mongot v1.0.31

Weekly downloads
53
License
MIT
Repository
github
Last release
5 months ago

reneos.mongot

A module to simplify working with database connections and MongoDB collections

install

npm install @reneos.mongot --save

https://www.npmjs.com/package/@reneos/mongot

How to use

import {DataManager,Database,DataConnection} from "@reneos/mongot"

Connect

  1. You can create one global database connection
	await DataManager.Init({
	"url": "mongodb://127.0.0.1:27017/",
	"database": "yourdatabase",
	"options": {	}
})

Load documents from Config collection

const configs = await DataManager.Configs.find().toArray()
  1. You can use multiple connections to different databases
	const _db = new DataConnection("anydbkey")

	await _db.open({
	"url": "mongodb://127.0.0.1:27017/",
	"database": "yourdatabase",
	"options": {	}
})

Load documents from Config collection

const configs = await _db.Configs.find().toArray()
OR
const configs = DataConnection.GetConnection('anydbkey').Configs.find().toArray()
1.0.31

5 months ago

1.0.27

6 months ago

1.0.26

2 years ago

1.0.25

2 years ago

1.0.24

3 years ago

1.0.22

3 years ago

1.0.23

3 years ago

1.0.21

3 years ago

1.0.19

3 years ago

1.0.20

3 years ago

1.0.18

3 years ago

1.0.17

3 years ago

1.0.16

3 years ago

1.0.15

3 years ago

1.0.12

3 years ago

1.0.11

3 years ago

1.0.9

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago