2.0.122 • Published 4 years ago

@tix-factory/mongodb v2.0.122

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

@tix-factory/mongodb

TODO: Lots more documentation

Examples

import { MongoConnection } from "@tix-factory/mongodb";

const mongoConnectionString = process.env.MONGO_CONNECTION_STRING;
const mongoConnection = new MongoConnection(mongoConnectionString);
const mongoCollection = await mongoConnection.getCollection("project name/database name", "collection name");

mongoCollection.insert({
	"name": "Hello, world!"
}).then(rowId => {
	// e.g. 31262747691000
	console.log("row added to collection\n\tID:", rowId);
}).catch(err => {
	console.error("failed to insert into collection", err);
});
import { IdGenerator } from "@tix-factory/mongodb";

const idGenerator = new IdGenerator({});
// e.g. 31262747691000
console.log(idGenerator.generate());
2.0.122

4 years ago

2.0.120

4 years ago

2.0.118

5 years ago

2.0.116

5 years ago

2.0.108

5 years ago

2.0.114

5 years ago

2.0.111

5 years ago

2.0.110

5 years ago

2.0.105

5 years ago

2.0.103

5 years ago

2.0.101

5 years ago

2.0.100

5 years ago

2.0.98

5 years ago

2.0.96

5 years ago