Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Synchronous methods #14

Closed
shellscape opened this issue Jan 19, 2014 · 5 comments
Closed

Synchronous methods #14

shellscape opened this issue Jan 19, 2014 · 5 comments

Comments

@shellscape
Copy link

For any decent sized webapp, you'll have situations where the query of a dataset requires the result of another dataset. You'll also have situations in which you want to query data in a particular order.

At the moment I'm using chaining/shifting and separate synchronous libraries to replicate this. As evidenced by node.js core modules and a very large number of popular modules, 'Sync' methods are becoming commonplace.

It'd be wonderful for this module to implement sync methods as well.

@patriksimek
Copy link
Collaborator

As far I know, you can only make sync code when using native sync methods. Node's net library (used by drivers) is completly async, so it is impossible to make it sync without using external lib.

You should check node-fibers or co.

@starandtina
Copy link

I'm using co to implement synchronous for node-mssql and it works great with generators. :)

@patriksimek
Copy link
Collaborator

I have just published wrapper for co, take a look - co-mssql

@starandtina
Copy link

@patriksimek cool! 👍 , thanks for your work.

@shellscape
Copy link
Author

@patriksimek thanks a lot for helping out with this. Extremely useful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants