# haxe-mongomod

> MongoDB driver for Haxe ====================================

Latest version **1.0.0** (published 2017-11-16) · ISC license · 0 weekly downloads

## Install

```sh
npm install haxe-mongomod
pnpm add haxe-mongomod
yarn add haxe-mongomod
bun add haxe-mongomod
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2017-11-16 |
| First published | 2017-11-16 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | haxelib.js |
| Keywords | haxe |

## Links

- npm: https://www.npmjs.com/package/haxe-mongomod
- npm.io page: https://npm.io/package/haxe-mongomod

## Recent versions

- 1.0.0 (latest) — 2017-11-16

## README

MongoDB driver for Haxe
====================================

Pure-haxe driver for MongoDB for sys targets. Based on https://github.com/MattTuttle/mongo-haxe-driver project.

Improvements (compared to base project):

 * production-ready (used by russian social network [http://vkrugudruzei.ru/](http://vkrugudruzei.ru/));
 * major refactored to avoid static methods (now support many connections to mongo instances);
 * Int64 always treated as Float (this prevent bugs when type hiddenly changed on records editing/importing/exporting);
 * support Date type;
 * several major bugfixes.

Find all objects in a collection
------------------------------------
Finding rows in a relational database can be a daunting process. Thankfully with Mongo it's just like accessing a regular Haxe object instance.

```haxe
import org.mongodb.Mongo;
...
var mongo = new Mongo("localhost", 27017);
for (post in mongo.blog.find())
{
	trace(post.title); // assumes that all posts have a title
}
```

Inserting and updating
------------------------------------
```haxe
import org.mongodb.Mongo;
...
var mongo = new Mongo("localhost", 27017);
var post = {
	title: 'My awesome post',
	body: 'MongoDB is easy as pie'
};
mongo.blog.posts.insert(post);

post.body = 'Made some updates to my post';
mongo.blog.posts.update({title: post.title}, post); // update the post
```

---
_Source: https://npm.io/package/haxe-mongomod · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
