Skip to content
This repository was archived by the owner on May 30, 2024. It is now read-only.
This repository was archived by the owner on May 30, 2024. It is now read-only.

Not work with promise-style library #36

@hoan006

Description

@hoan006

I'm mainly using Mongoose for my project and I hope I can achieve something like this:

var person = Person.findOne.sync({name: "John"}); // not work
var count = Person.count.sync(); // works

Sadly, 'findOne' function uses promise (https://github.com/LearnBoost/mongoose/blob/3.8.x/lib/query.js#L991) and it breaks the node-sync, while 'count' doesn't use. Is there a way to support promise?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions